Files
apps.prometeysev.ru/vendor/cakephp/cakephp-codesniffer/CakePHP/Tests/WhiteSpace/OperatorSpacingUnitTest.inc
T

34 lines
522 B
PHP
Raw Normal View History

2026-10-22 00:22:57 +03:00
<?php
declare(strict_types=1);
$ten =10 * 2;
$ten= -10 * 2;
$ten = 10/-2;
$bool = true& true;
$bool = true &true;
$bool = true&true;
$foo = -1;
switch ($foo) {
case -1:
break;
case 'negative':
return -1;
}
$bar = isset($foo) ? -2 : 0;
$foo = isset($bar) ? 0 : -2;
$ten = 10 * 2;
$ten = -10 * 2;
$ten = 10 / -2;
$ten = -10 / 2;
$ten = -10 + 2;
$ten = 10 + -2;
$ten = -10 - 2;
$ten = 10 - -2;
$dec = -0.001;
$dec = -1;
$bool = true & true;
$arr = [-1];
$refArr = [&$foo];
$refArr = [$bar, &$foo];