@@ -7,8 +7,8 @@ |
||
| 7 | 7 | } else if ($array [ ($index + 1) ] === null) { |
| 8 | 8 | } |
| 9 | 9 | $array = [ |
| 10 | - 'foo' => 'bar', |
|
| 11 | - 'bar' => 'foo', |
|
| 10 | + 'foo' => 'bar', |
|
| 11 | + 'bar' => 'foo', |
|
| 12 | 12 | ]; |
| 13 | 13 | |
| 14 | 14 | if ($foo) {} |
@@ -2,9 +2,9 @@ discard block |
||
| 2 | 2 | $myArray['key'] = $value; |
| 3 | 3 | $myArray[/* key start */'key'] = $value; |
| 4 | 4 | $myArray[/* key start */'key'/* key end */] = $value; |
| 5 | -$myArray [ 'key' ] = $value; |
|
| 5 | +$myArray ['key'] = $value; |
|
| 6 | 6 | if ($array[($index + 1)] === true) { |
| 7 | -} else if ($array [ ($index + 1) ] === null) { |
|
| 7 | +} else if ($array [($index + 1)] === null) { |
|
| 8 | 8 | } |
| 9 | 9 | $array = [ |
| 10 | 10 | 'foo' => 'bar', |
@@ -14,18 +14,18 @@ discard block |
||
| 14 | 14 | if ($foo) {} |
| 15 | 15 | [$a, $b] = $c; |
| 16 | 16 | |
| 17 | -echo foo()[ 1 ]; |
|
| 17 | +echo foo()[1]; |
|
| 18 | 18 | |
| 19 | 19 | echo $this->addedCustomFunctions['nonce']; |
| 20 | -echo $this->deprecated_functions[ $function_name ]['version']; |
|
| 20 | +echo $this->deprecated_functions[$function_name]['version']; |
|
| 21 | 21 | |
| 22 | -echo [ 1,2,3 ][0]; |
|
| 23 | -echo [ 1,2,3 ][ 0 ]; |
|
| 24 | -echo 'PHP'[ 0 ]; |
|
| 22 | +echo [1, 2, 3][0]; |
|
| 23 | +echo [1, 2, 3][0]; |
|
| 24 | +echo 'PHP'[0]; |
|
| 25 | 25 | |
| 26 | 26 | $array = []; |
| 27 | 27 | $var = $var[$var[$var]]]; // Syntax error |
| 28 | 28 | $var = $var[$var[$var]; // Syntax error |
| 29 | 29 | |
| 30 | -$myArray[ /* key start */'key'] = $value; |
|
| 31 | -$myArray[ /* key start */'key'/* key end */ ] = $value; |
|
| 30 | +$myArray[/* key start */'key'] = $value; |
|
| 31 | +$myArray[/* key start */'key'/* key end */] = $value; |
|
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return array<int, int> |
| 27 | 27 | */ |
| 28 | - public function getErrorList($testFile='OperatorBracketUnitTest.inc') |
|
| 28 | + public function getErrorList($testFile = 'OperatorBracketUnitTest.inc') |
|
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | 31 | case 'OperatorBracketUnitTest.inc': |
@@ -15,103 +15,103 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Returns the lines where errors should occur. |
|
| 20 | - * |
|
| 21 | - * The key of the array should represent the line number and the value |
|
| 22 | - * should represent the number of errors that should occur on that line. |
|
| 23 | - * |
|
| 24 | - * @param string $testFile The name of the file being tested. |
|
| 25 | - * |
|
| 26 | - * @return array<int, int> |
|
| 27 | - */ |
|
| 28 | - public function getErrorList($testFile='OperatorBracketUnitTest.inc') |
|
| 29 | - { |
|
| 30 | - switch ($testFile) { |
|
| 31 | - case 'OperatorBracketUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 3 => 1, |
|
| 34 | - 6 => 1, |
|
| 35 | - 9 => 1, |
|
| 36 | - 12 => 1, |
|
| 37 | - 15 => 1, |
|
| 38 | - 18 => 2, |
|
| 39 | - 20 => 1, |
|
| 40 | - 25 => 1, |
|
| 41 | - 28 => 1, |
|
| 42 | - 31 => 1, |
|
| 43 | - 34 => 1, |
|
| 44 | - 37 => 1, |
|
| 45 | - 40 => 1, |
|
| 46 | - 43 => 2, |
|
| 47 | - 45 => 1, |
|
| 48 | - 47 => 5, |
|
| 49 | - 48 => 1, |
|
| 50 | - 50 => 2, |
|
| 51 | - 55 => 2, |
|
| 52 | - 56 => 1, |
|
| 53 | - 63 => 2, |
|
| 54 | - 64 => 1, |
|
| 55 | - 67 => 1, |
|
| 56 | - 86 => 1, |
|
| 57 | - 90 => 1, |
|
| 58 | - 109 => 1, |
|
| 59 | - 130 => 1, |
|
| 60 | - 134 => 1, |
|
| 61 | - 135 => 2, |
|
| 62 | - 137 => 1, |
|
| 63 | - 139 => 1, |
|
| 64 | - 150 => 1, |
|
| 65 | - 161 => 1, |
|
| 66 | - 163 => 2, |
|
| 67 | - 165 => 2, |
|
| 68 | - 169 => 1, |
|
| 69 | - 174 => 1, |
|
| 70 | - 176 => 1, |
|
| 71 | - 185 => 1, |
|
| 72 | - 189 => 1, |
|
| 73 | - 193 => 1, |
|
| 74 | - 194 => 2, |
|
| 75 | - ]; |
|
| 76 | - break; |
|
| 77 | - case 'OperatorBracketUnitTest.js': |
|
| 78 | - return [ |
|
| 79 | - 5 => 1, |
|
| 80 | - 8 => 1, |
|
| 81 | - 11 => 1, |
|
| 82 | - 14 => 1, |
|
| 83 | - 24 => 1, |
|
| 84 | - 30 => 1, |
|
| 85 | - 33 => 1, |
|
| 86 | - 36 => 1, |
|
| 87 | - 39 => 1, |
|
| 88 | - 46 => 1, |
|
| 89 | - 47 => 1, |
|
| 90 | - 63 => 1, |
|
| 91 | - 108 => 1, |
|
| 92 | - ]; |
|
| 93 | - break; |
|
| 94 | - default: |
|
| 95 | - return []; |
|
| 96 | - break; |
|
| 97 | - }//end switch |
|
| 18 | + /** |
|
| 19 | + * Returns the lines where errors should occur. |
|
| 20 | + * |
|
| 21 | + * The key of the array should represent the line number and the value |
|
| 22 | + * should represent the number of errors that should occur on that line. |
|
| 23 | + * |
|
| 24 | + * @param string $testFile The name of the file being tested. |
|
| 25 | + * |
|
| 26 | + * @return array<int, int> |
|
| 27 | + */ |
|
| 28 | + public function getErrorList($testFile='OperatorBracketUnitTest.inc') |
|
| 29 | + { |
|
| 30 | + switch ($testFile) { |
|
| 31 | + case 'OperatorBracketUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 3 => 1, |
|
| 34 | + 6 => 1, |
|
| 35 | + 9 => 1, |
|
| 36 | + 12 => 1, |
|
| 37 | + 15 => 1, |
|
| 38 | + 18 => 2, |
|
| 39 | + 20 => 1, |
|
| 40 | + 25 => 1, |
|
| 41 | + 28 => 1, |
|
| 42 | + 31 => 1, |
|
| 43 | + 34 => 1, |
|
| 44 | + 37 => 1, |
|
| 45 | + 40 => 1, |
|
| 46 | + 43 => 2, |
|
| 47 | + 45 => 1, |
|
| 48 | + 47 => 5, |
|
| 49 | + 48 => 1, |
|
| 50 | + 50 => 2, |
|
| 51 | + 55 => 2, |
|
| 52 | + 56 => 1, |
|
| 53 | + 63 => 2, |
|
| 54 | + 64 => 1, |
|
| 55 | + 67 => 1, |
|
| 56 | + 86 => 1, |
|
| 57 | + 90 => 1, |
|
| 58 | + 109 => 1, |
|
| 59 | + 130 => 1, |
|
| 60 | + 134 => 1, |
|
| 61 | + 135 => 2, |
|
| 62 | + 137 => 1, |
|
| 63 | + 139 => 1, |
|
| 64 | + 150 => 1, |
|
| 65 | + 161 => 1, |
|
| 66 | + 163 => 2, |
|
| 67 | + 165 => 2, |
|
| 68 | + 169 => 1, |
|
| 69 | + 174 => 1, |
|
| 70 | + 176 => 1, |
|
| 71 | + 185 => 1, |
|
| 72 | + 189 => 1, |
|
| 73 | + 193 => 1, |
|
| 74 | + 194 => 2, |
|
| 75 | + ]; |
|
| 76 | + break; |
|
| 77 | + case 'OperatorBracketUnitTest.js': |
|
| 78 | + return [ |
|
| 79 | + 5 => 1, |
|
| 80 | + 8 => 1, |
|
| 81 | + 11 => 1, |
|
| 82 | + 14 => 1, |
|
| 83 | + 24 => 1, |
|
| 84 | + 30 => 1, |
|
| 85 | + 33 => 1, |
|
| 86 | + 36 => 1, |
|
| 87 | + 39 => 1, |
|
| 88 | + 46 => 1, |
|
| 89 | + 47 => 1, |
|
| 90 | + 63 => 1, |
|
| 91 | + 108 => 1, |
|
| 92 | + ]; |
|
| 93 | + break; |
|
| 94 | + default: |
|
| 95 | + return []; |
|
| 96 | + break; |
|
| 97 | + }//end switch |
|
| 98 | 98 | |
| 99 | - }//end getErrorList() |
|
| 99 | + }//end getErrorList() |
|
| 100 | 100 | |
| 101 | 101 | |
| 102 | - /** |
|
| 103 | - * Returns the lines where warnings should occur. |
|
| 104 | - * |
|
| 105 | - * The key of the array should represent the line number and the value |
|
| 106 | - * should represent the number of warnings that should occur on that line. |
|
| 107 | - * |
|
| 108 | - * @return array<int, int> |
|
| 109 | - */ |
|
| 110 | - public function getWarningList() |
|
| 111 | - { |
|
| 112 | - return []; |
|
| 102 | + /** |
|
| 103 | + * Returns the lines where warnings should occur. |
|
| 104 | + * |
|
| 105 | + * The key of the array should represent the line number and the value |
|
| 106 | + * should represent the number of warnings that should occur on that line. |
|
| 107 | + * |
|
| 108 | + * @return array<int, int> |
|
| 109 | + */ |
|
| 110 | + public function getWarningList() |
|
| 111 | + { |
|
| 112 | + return []; |
|
| 113 | 113 | |
| 114 | - }//end getWarningList() |
|
| 114 | + }//end getWarningList() |
|
| 115 | 115 | |
| 116 | 116 | |
| 117 | 117 | }//end class |
@@ -28,72 +28,72 @@ |
||
| 28 | 28 | public function getErrorList($testFile='OperatorBracketUnitTest.inc') |
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | - case 'OperatorBracketUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 3 => 1, |
|
| 34 | - 6 => 1, |
|
| 35 | - 9 => 1, |
|
| 36 | - 12 => 1, |
|
| 37 | - 15 => 1, |
|
| 38 | - 18 => 2, |
|
| 39 | - 20 => 1, |
|
| 40 | - 25 => 1, |
|
| 41 | - 28 => 1, |
|
| 42 | - 31 => 1, |
|
| 43 | - 34 => 1, |
|
| 44 | - 37 => 1, |
|
| 45 | - 40 => 1, |
|
| 46 | - 43 => 2, |
|
| 47 | - 45 => 1, |
|
| 48 | - 47 => 5, |
|
| 49 | - 48 => 1, |
|
| 50 | - 50 => 2, |
|
| 51 | - 55 => 2, |
|
| 52 | - 56 => 1, |
|
| 53 | - 63 => 2, |
|
| 54 | - 64 => 1, |
|
| 55 | - 67 => 1, |
|
| 56 | - 86 => 1, |
|
| 57 | - 90 => 1, |
|
| 58 | - 109 => 1, |
|
| 59 | - 130 => 1, |
|
| 60 | - 134 => 1, |
|
| 61 | - 135 => 2, |
|
| 62 | - 137 => 1, |
|
| 63 | - 139 => 1, |
|
| 64 | - 150 => 1, |
|
| 65 | - 161 => 1, |
|
| 66 | - 163 => 2, |
|
| 67 | - 165 => 2, |
|
| 68 | - 169 => 1, |
|
| 69 | - 174 => 1, |
|
| 70 | - 176 => 1, |
|
| 71 | - 185 => 1, |
|
| 72 | - 189 => 1, |
|
| 73 | - 193 => 1, |
|
| 74 | - 194 => 2, |
|
| 75 | - ]; |
|
| 76 | - break; |
|
| 77 | - case 'OperatorBracketUnitTest.js': |
|
| 78 | - return [ |
|
| 79 | - 5 => 1, |
|
| 80 | - 8 => 1, |
|
| 81 | - 11 => 1, |
|
| 82 | - 14 => 1, |
|
| 83 | - 24 => 1, |
|
| 84 | - 30 => 1, |
|
| 85 | - 33 => 1, |
|
| 86 | - 36 => 1, |
|
| 87 | - 39 => 1, |
|
| 88 | - 46 => 1, |
|
| 89 | - 47 => 1, |
|
| 90 | - 63 => 1, |
|
| 91 | - 108 => 1, |
|
| 92 | - ]; |
|
| 93 | - break; |
|
| 94 | - default: |
|
| 95 | - return []; |
|
| 96 | - break; |
|
| 31 | + case 'OperatorBracketUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 3 => 1, |
|
| 34 | + 6 => 1, |
|
| 35 | + 9 => 1, |
|
| 36 | + 12 => 1, |
|
| 37 | + 15 => 1, |
|
| 38 | + 18 => 2, |
|
| 39 | + 20 => 1, |
|
| 40 | + 25 => 1, |
|
| 41 | + 28 => 1, |
|
| 42 | + 31 => 1, |
|
| 43 | + 34 => 1, |
|
| 44 | + 37 => 1, |
|
| 45 | + 40 => 1, |
|
| 46 | + 43 => 2, |
|
| 47 | + 45 => 1, |
|
| 48 | + 47 => 5, |
|
| 49 | + 48 => 1, |
|
| 50 | + 50 => 2, |
|
| 51 | + 55 => 2, |
|
| 52 | + 56 => 1, |
|
| 53 | + 63 => 2, |
|
| 54 | + 64 => 1, |
|
| 55 | + 67 => 1, |
|
| 56 | + 86 => 1, |
|
| 57 | + 90 => 1, |
|
| 58 | + 109 => 1, |
|
| 59 | + 130 => 1, |
|
| 60 | + 134 => 1, |
|
| 61 | + 135 => 2, |
|
| 62 | + 137 => 1, |
|
| 63 | + 139 => 1, |
|
| 64 | + 150 => 1, |
|
| 65 | + 161 => 1, |
|
| 66 | + 163 => 2, |
|
| 67 | + 165 => 2, |
|
| 68 | + 169 => 1, |
|
| 69 | + 174 => 1, |
|
| 70 | + 176 => 1, |
|
| 71 | + 185 => 1, |
|
| 72 | + 189 => 1, |
|
| 73 | + 193 => 1, |
|
| 74 | + 194 => 2, |
|
| 75 | + ]; |
|
| 76 | + break; |
|
| 77 | + case 'OperatorBracketUnitTest.js': |
|
| 78 | + return [ |
|
| 79 | + 5 => 1, |
|
| 80 | + 8 => 1, |
|
| 81 | + 11 => 1, |
|
| 82 | + 14 => 1, |
|
| 83 | + 24 => 1, |
|
| 84 | + 30 => 1, |
|
| 85 | + 33 => 1, |
|
| 86 | + 36 => 1, |
|
| 87 | + 39 => 1, |
|
| 88 | + 46 => 1, |
|
| 89 | + 47 => 1, |
|
| 90 | + 63 => 1, |
|
| 91 | + 108 => 1, |
|
| 92 | + ]; |
|
| 93 | + break; |
|
| 94 | + default: |
|
| 95 | + return []; |
|
| 96 | + break; |
|
| 97 | 97 | }//end switch |
| 98 | 98 | |
| 99 | 99 | }//end getErrorList() |
@@ -105,8 +105,12 @@ |
||
| 105 | 105 | |
| 106 | 106 | }//end class |
| 107 | 107 | |
| 108 | -if ($index < -1) $index = 0; |
|
| 109 | -if ($index < - 1) $index = 0; |
|
| 108 | +if ($index < -1) { |
|
| 109 | + $index = 0; |
|
| 110 | +} |
|
| 111 | +if ($index < - 1) { |
|
| 112 | + $index = 0; |
|
| 113 | +} |
|
| 110 | 114 | |
| 111 | 115 | $three = ceil($one / $two); |
| 112 | 116 | $three = ceil(($one / $two) / $four); |
@@ -52,10 +52,10 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | function myFunction() |
| 54 | 54 | { |
| 55 | - $value = ($one + 1) + ($two + 2) + (myFunction() + 2); |
|
| 56 | - $value = myFunction() + 2; |
|
| 57 | - $value = (myFunction($var) + myFunction2($var)); |
|
| 58 | - return -1; |
|
| 55 | + $value = ($one + 1) + ($two + 2) + (myFunction() + 2); |
|
| 56 | + $value = myFunction() + 2; |
|
| 57 | + $value = (myFunction($var) + myFunction2($var)); |
|
| 58 | + return -1; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $line = substr($line, 0, -2); |
@@ -65,18 +65,18 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | if ($pos === count($this->tokens) - 1) { |
| 68 | - $file = '...'.substr($file, (($padding * -1) + 3)); |
|
| 68 | + $file = '...'.substr($file, (($padding * -1) + 3)); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | if (substr($basename, -5) !== 'Sniff') { |
| 72 | - $i = ($this->_tokens[$i]['parenthesis_closer'] + 1); |
|
| 72 | + $i = ($this->_tokens[$i]['parenthesis_closer'] + 1); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | $pos = $this->_getShortCommentEndPos(); |
| 76 | 76 | if ($pos === -1) { |
| 77 | - $stackPtr = ($tokens[$next][$to] - 1); |
|
| 78 | - $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1); |
|
| 79 | - $var = (($var1 + $var2) + $var3 + $var4) |
|
| 77 | + $stackPtr = ($tokens[$next][$to] - 1); |
|
| 78 | + $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1); |
|
| 79 | + $var = (($var1 + $var2) + $var3 + $var4) |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | $commentStart = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($commentEnd - 1), null, true) + 1); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $expected .= '...'.substr($tokens[($stackPtr - 2)]['content'], -5).$tokens[$stackPtr]['content']; |
| 85 | 85 | |
| 86 | 86 | if (($tokens[$nextToken - 1]['code']) !== T_WHITESPACE) { |
| 87 | - $errorPos = ($params[(count($params) - 1)]->getLine() + $commentStart); |
|
| 87 | + $errorPos = ($params[(count($params) - 1)]->getLine() + $commentStart); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | while (($nextSpace = $phpcsFile->findNext(T_WHITESPACE, $nextSpace + 1, $nextBreak)) !== false) { |
@@ -97,10 +97,10 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | |
| 99 | 99 | |
| 100 | - public function &myFunction(array &$one, array &$two) |
|
| 101 | - { |
|
| 100 | + public function &myFunction(array &$one, array &$two) |
|
| 101 | + { |
|
| 102 | 102 | |
| 103 | - }//end myFunction() |
|
| 103 | + }//end myFunction() |
|
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | }//end class |
@@ -117,19 +117,19 @@ discard block |
||
| 117 | 117 | $three = ceil($one[1] / $two); |
| 118 | 118 | |
| 119 | 119 | switch ($number % 10) { |
| 120 | - case -1: |
|
| 121 | - $suffix = 'st'; |
|
| 122 | - break; |
|
| 120 | + case -1: |
|
| 121 | + $suffix = 'st'; |
|
| 122 | + break; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | $expectedPermission = array( |
| 126 | - 'granted' => 4, |
|
| 127 | - 'denied' => 1, |
|
| 128 | - 'cascade' => TRUE, |
|
| 129 | - 'blockergranted' => 2, |
|
| 130 | - 'blockerdenied' => - 3, |
|
| 131 | - 'effective' => TRUE, |
|
| 132 | - ); |
|
| 126 | + 'granted' => 4, |
|
| 127 | + 'denied' => 1, |
|
| 128 | + 'cascade' => TRUE, |
|
| 129 | + 'blockergranted' => 2, |
|
| 130 | + 'blockerdenied' => - 3, |
|
| 131 | + 'effective' => TRUE, |
|
| 132 | + ); |
|
| 133 | 133 | |
| 134 | 134 | $value = (int) isset($blah) + 2; |
| 135 | 135 | $value = (int) isset($blah) + (int) isset($foo) + (int) isset($bar); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | foo(1 + 2 + 3); |
| 152 | 152 | |
| 153 | 153 | if (empty($foo[-1]) === true) { |
| 154 | - $foo[-1] = 'foo'; |
|
| 154 | + $foo[-1] = 'foo'; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | try { |
@@ -178,18 +178,18 @@ discard block |
||
| 178 | 178 | exit -1; |
| 179 | 179 | |
| 180 | 180 | $expr = match ($number - 10) { |
| 181 | - -1 => 0, |
|
| 181 | + -1 => 0, |
|
| 182 | 182 | }; |
| 183 | 183 | |
| 184 | 184 | $expr = match ($number % 10) { |
| 185 | - 1 => 2 * $num, |
|
| 185 | + 1 => 2 * $num, |
|
| 186 | 186 | }; |
| 187 | 187 | |
| 188 | 188 | $expr = match (true) { |
| 189 | - $num * 100 > 500 => 'expression in key', |
|
| 189 | + $num * 100 > 500 => 'expression in key', |
|
| 190 | 190 | }; |
| 191 | 191 | |
| 192 | 192 | // PHP 8.0 named parameters. |
| 193 | 193 | if ($pos === count(value: $this->tokens) - 1) { |
| 194 | - $file = '...'.substr(string: $file, offset: $padding * -1 + 3); |
|
| 194 | + $file = '...'.substr(string: $file, offset: $padding * -1 + 3); |
|
| 195 | 195 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | $line = substr($line, 0, -2); |
| 62 | 62 | $words = preg_split('|(\s+)|', $line."\n", -1, $flags); |
| 63 | -if (!isset($this->words[$wordPos-1]) || $this->words[$wordPos-1] !== ' ') { |
|
| 63 | +if ( ! isset($this->words[$wordPos - 1]) || $this->words[$wordPos - 1] !== ' ') { |
|
| 64 | 64 | } else if ($this->tokens[$pos + 1] === "\n") { |
| 65 | 65 | } |
| 66 | 66 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | 'denied' => 1, |
| 128 | 128 | 'cascade' => TRUE, |
| 129 | 129 | 'blockergranted' => 2, |
| 130 | - 'blockerdenied' => - 3, |
|
| 130 | + 'blockerdenied' => -3, |
|
| 131 | 131 | 'effective' => TRUE, |
| 132 | 132 | ); |
| 133 | 133 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | $var = $foo['blah'] + []; |
| 162 | 162 | |
| 163 | -$a = 2 * ${x} - ${minus}; |
|
| 163 | +$a = 2 * ${x} -${minus}; |
|
| 164 | 164 | |
| 165 | 165 | $foo = $bar ?? $baz ?? ''; |
| 166 | 166 | |
@@ -15,52 +15,52 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Returns the lines where errors should occur. |
|
| 20 | - * |
|
| 21 | - * The key of the array should represent the line number and the value |
|
| 22 | - * should represent the number of errors that should occur on that line. |
|
| 23 | - * |
|
| 24 | - * @return array<int, int> |
|
| 25 | - */ |
|
| 26 | - public function getErrorList() |
|
| 27 | - { |
|
| 28 | - return [ |
|
| 29 | - 3 => 5, |
|
| 30 | - 5 => 1, |
|
| 31 | - 6 => 1, |
|
| 32 | - 9 => 1, |
|
| 33 | - 10 => 1, |
|
| 34 | - 12 => 1, |
|
| 35 | - 13 => 1, |
|
| 36 | - 14 => 1, |
|
| 37 | - 15 => 1, |
|
| 38 | - 16 => 5, |
|
| 39 | - 22 => 1, |
|
| 40 | - 27 => 5, |
|
| 41 | - 29 => 1, |
|
| 42 | - 30 => 1, |
|
| 43 | - 31 => 1, |
|
| 44 | - 47 => 2, |
|
| 45 | - 49 => 1, |
|
| 46 | - ]; |
|
| 18 | + /** |
|
| 19 | + * Returns the lines where errors should occur. |
|
| 20 | + * |
|
| 21 | + * The key of the array should represent the line number and the value |
|
| 22 | + * should represent the number of errors that should occur on that line. |
|
| 23 | + * |
|
| 24 | + * @return array<int, int> |
|
| 25 | + */ |
|
| 26 | + public function getErrorList() |
|
| 27 | + { |
|
| 28 | + return [ |
|
| 29 | + 3 => 5, |
|
| 30 | + 5 => 1, |
|
| 31 | + 6 => 1, |
|
| 32 | + 9 => 1, |
|
| 33 | + 10 => 1, |
|
| 34 | + 12 => 1, |
|
| 35 | + 13 => 1, |
|
| 36 | + 14 => 1, |
|
| 37 | + 15 => 1, |
|
| 38 | + 16 => 5, |
|
| 39 | + 22 => 1, |
|
| 40 | + 27 => 5, |
|
| 41 | + 29 => 1, |
|
| 42 | + 30 => 1, |
|
| 43 | + 31 => 1, |
|
| 44 | + 47 => 2, |
|
| 45 | + 49 => 1, |
|
| 46 | + ]; |
|
| 47 | 47 | |
| 48 | - }//end getErrorList() |
|
| 48 | + }//end getErrorList() |
|
| 49 | 49 | |
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - * Returns the lines where warnings should occur. |
|
| 53 | - * |
|
| 54 | - * The key of the array should represent the line number and the value |
|
| 55 | - * should represent the number of warnings that should occur on that line. |
|
| 56 | - * |
|
| 57 | - * @return array<int, int> |
|
| 58 | - */ |
|
| 59 | - public function getWarningList() |
|
| 60 | - { |
|
| 61 | - return []; |
|
| 51 | + /** |
|
| 52 | + * Returns the lines where warnings should occur. |
|
| 53 | + * |
|
| 54 | + * The key of the array should represent the line number and the value |
|
| 55 | + * should represent the number of warnings that should occur on that line. |
|
| 56 | + * |
|
| 57 | + * @return array<int, int> |
|
| 58 | + */ |
|
| 59 | + public function getWarningList() |
|
| 60 | + { |
|
| 61 | + return []; |
|
| 62 | 62 | |
| 63 | - }//end getWarningList() |
|
| 63 | + }//end getWarningList() |
|
| 64 | 64 | |
| 65 | 65 | |
| 66 | 66 | }//end class |
@@ -33,5 +33,5 @@ |
||
| 33 | 33 | there"; |
| 34 | 34 | |
| 35 | 35 | function test() { |
| 36 | - echo "It Worked'; |
|
| 36 | + echo "It Worked'; |
|
| 37 | 37 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $string = "\$var"; |
| 18 | 18 | |
| 19 | 19 | $x = "bar = '$z', |
| 20 | -baz = '" . $a . "'...$x"; |
|
| 20 | +baz = '".$a."'...$x"; |
|
| 21 | 21 | |
| 22 | 22 | $string = "Hello |
| 23 | 23 | there"; |
@@ -15,48 +15,48 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Returns the lines where errors should occur. |
|
| 20 | - * |
|
| 21 | - * The key of the array should represent the line number and the value |
|
| 22 | - * should represent the number of errors that should occur on that line. |
|
| 23 | - * |
|
| 24 | - * @return array<int, int> |
|
| 25 | - */ |
|
| 26 | - public function getErrorList() |
|
| 27 | - { |
|
| 28 | - return [ |
|
| 29 | - 4 => 1, |
|
| 30 | - 5 => 1, |
|
| 31 | - 6 => 1, |
|
| 32 | - 8 => 2, |
|
| 33 | - 14 => 1, |
|
| 34 | - 15 => 1, |
|
| 35 | - 17 => 1, |
|
| 36 | - 19 => 1, |
|
| 37 | - 20 => 1, |
|
| 38 | - 22 => 1, |
|
| 39 | - 29 => 1, |
|
| 40 | - 30 => 1, |
|
| 41 | - 32 => 1, |
|
| 42 | - ]; |
|
| 43 | - |
|
| 44 | - }//end getErrorList() |
|
| 45 | - |
|
| 46 | - |
|
| 47 | - /** |
|
| 48 | - * Returns the lines where warnings should occur. |
|
| 49 | - * |
|
| 50 | - * The key of the array should represent the line number and the value |
|
| 51 | - * should represent the number of warnings that should occur on that line. |
|
| 52 | - * |
|
| 53 | - * @return array<int, int> |
|
| 54 | - */ |
|
| 55 | - public function getWarningList() |
|
| 56 | - { |
|
| 57 | - return []; |
|
| 58 | - |
|
| 59 | - }//end getWarningList() |
|
| 18 | + /** |
|
| 19 | + * Returns the lines where errors should occur. |
|
| 20 | + * |
|
| 21 | + * The key of the array should represent the line number and the value |
|
| 22 | + * should represent the number of errors that should occur on that line. |
|
| 23 | + * |
|
| 24 | + * @return array<int, int> |
|
| 25 | + */ |
|
| 26 | + public function getErrorList() |
|
| 27 | + { |
|
| 28 | + return [ |
|
| 29 | + 4 => 1, |
|
| 30 | + 5 => 1, |
|
| 31 | + 6 => 1, |
|
| 32 | + 8 => 2, |
|
| 33 | + 14 => 1, |
|
| 34 | + 15 => 1, |
|
| 35 | + 17 => 1, |
|
| 36 | + 19 => 1, |
|
| 37 | + 20 => 1, |
|
| 38 | + 22 => 1, |
|
| 39 | + 29 => 1, |
|
| 40 | + 30 => 1, |
|
| 41 | + 32 => 1, |
|
| 42 | + ]; |
|
| 43 | + |
|
| 44 | + }//end getErrorList() |
|
| 45 | + |
|
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * Returns the lines where warnings should occur. |
|
| 49 | + * |
|
| 50 | + * The key of the array should represent the line number and the value |
|
| 51 | + * should represent the number of warnings that should occur on that line. |
|
| 52 | + * |
|
| 53 | + * @return array<int, int> |
|
| 54 | + */ |
|
| 55 | + public function getWarningList() |
|
| 56 | + { |
|
| 57 | + return []; |
|
| 58 | + |
|
| 59 | + }//end getWarningList() |
|
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | }//end class |
@@ -15,41 +15,41 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Returns the lines where errors should occur. |
|
| 20 | - * |
|
| 21 | - * The key of the array should represent the line number and the value |
|
| 22 | - * should represent the number of errors that should occur on that line. |
|
| 23 | - * |
|
| 24 | - * @return array<int, int> |
|
| 25 | - */ |
|
| 26 | - public function getErrorList() |
|
| 27 | - { |
|
| 28 | - return [ |
|
| 29 | - 5 => 1, |
|
| 30 | - 6 => 1, |
|
| 31 | - 7 => 1, |
|
| 32 | - 8 => 1, |
|
| 33 | - 9 => 1, |
|
| 34 | - 13 => 1, |
|
| 35 | - ]; |
|
| 36 | - |
|
| 37 | - }//end getErrorList() |
|
| 38 | - |
|
| 39 | - |
|
| 40 | - /** |
|
| 41 | - * Returns the lines where warnings should occur. |
|
| 42 | - * |
|
| 43 | - * The key of the array should represent the line number and the value |
|
| 44 | - * should represent the number of warnings that should occur on that line. |
|
| 45 | - * |
|
| 46 | - * @return array<int, int> |
|
| 47 | - */ |
|
| 48 | - public function getWarningList() |
|
| 49 | - { |
|
| 50 | - return []; |
|
| 51 | - |
|
| 52 | - }//end getWarningList() |
|
| 18 | + /** |
|
| 19 | + * Returns the lines where errors should occur. |
|
| 20 | + * |
|
| 21 | + * The key of the array should represent the line number and the value |
|
| 22 | + * should represent the number of errors that should occur on that line. |
|
| 23 | + * |
|
| 24 | + * @return array<int, int> |
|
| 25 | + */ |
|
| 26 | + public function getErrorList() |
|
| 27 | + { |
|
| 28 | + return [ |
|
| 29 | + 5 => 1, |
|
| 30 | + 6 => 1, |
|
| 31 | + 7 => 1, |
|
| 32 | + 8 => 1, |
|
| 33 | + 9 => 1, |
|
| 34 | + 13 => 1, |
|
| 35 | + ]; |
|
| 36 | + |
|
| 37 | + }//end getErrorList() |
|
| 38 | + |
|
| 39 | + |
|
| 40 | + /** |
|
| 41 | + * Returns the lines where warnings should occur. |
|
| 42 | + * |
|
| 43 | + * The key of the array should represent the line number and the value |
|
| 44 | + * should represent the number of warnings that should occur on that line. |
|
| 45 | + * |
|
| 46 | + * @return array<int, int> |
|
| 47 | + */ |
|
| 48 | + public function getWarningList() |
|
| 49 | + { |
|
| 50 | + return []; |
|
| 51 | + |
|
| 52 | + }//end getWarningList() |
|
| 53 | 53 | |
| 54 | 54 | |
| 55 | 55 | }//end class |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | echo($hello); |
| 7 | 7 | echo ('hello'); |
| 8 | 8 | echo ($hello); |
| 9 | -echo($y) ; |
|
| 9 | +echo($y); |
|
| 10 | 10 | echo ($loan_device->returndate == 0) ? 'Not returned' : date('d/m/Y', $loan_device->returndate); |
| 11 | 11 | ?> |
| 12 | -<p><?php echo ($foo) ? 'true' : 'false' ?></p> |
|
| 12 | +<p><?php echo ($foo) ? 'true' : 'false' ?></p> |
|
| 13 | 13 | <p><?php echo ($foo) ?></p> |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | . '3'; |
| 37 | 37 | |
| 38 | 38 | $y = '1' . |
| 39 | - '2' . |
|
| 40 | - '3'; |
|
| 39 | + '2' . |
|
| 40 | + '3'; |
|
| 41 | 41 | |
| 42 | 42 | $y = '1' |
| 43 | 43 | . '2' |
@@ -45,5 +45,5 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $y = '1' |
| 47 | 47 | .'2'. |
| 48 | - '3' |
|
| 48 | + '3' |
|
| 49 | 49 | . '4'; |
@@ -1,42 +1,42 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $string = 'Hello'.$there.'. How are'.$you.$going."today $okay"; |
| 3 | -$string = 'Hello' . $there . '. How are' . $you . $going . "today $okay"; |
|
| 3 | +$string = 'Hello'.$there.'. How are'.$you.$going."today $okay"; |
|
| 4 | +$string = 'Hello'.$there; |
|
| 5 | +$string = 'Hello'.$there; |
|
| 4 | 6 | $string = 'Hello'.$there; |
| 5 | -$string = 'Hello'. $there; |
|
| 6 | -$string = 'Hello' .$there; |
|
| 7 | 7 | |
| 8 | 8 | $y = '1' |
| 9 | 9 | . '2' |
| 10 | 10 | . '3'; |
| 11 | 11 | |
| 12 | -echo 1 . 'test'; |
|
| 13 | -echo 1.1 . 'test'; |
|
| 14 | -echo 'test' . 1; |
|
| 15 | -echo 'test' . 1.1; |
|
| 16 | -echo 'test' . 1 . 'test' . 2.2 . 'test' . 3; |
|
| 12 | +echo 1.'test'; |
|
| 13 | +echo 1.1.'test'; |
|
| 14 | +echo 'test'.1; |
|
| 15 | +echo 'test'.1.1; |
|
| 16 | +echo 'test'.1.'test'.2.2.'test'.3; |
|
| 17 | 17 | |
| 18 | -get_current_screen()->add_help_tab( array( |
|
| 18 | +get_current_screen()->add_help_tab(array( |
|
| 19 | 19 | 'id' => <<<EOD |
| 20 | 20 | Here comes some text. |
| 21 | 21 | EOD |
| 22 | 22 | . '</hr>', |
| 23 | -) ); |
|
| 23 | +)); |
|
| 24 | 24 | |
| 25 | 25 | // phpcs:set Squiz.Strings.ConcatenationSpacing spacing 1 |
| 26 | 26 | |
| 27 | -$string = 'Hello'.$there.'. How are'.$you.$going. "today $okay"; |
|
| 28 | -$string = 'Hello' . $there . '. How are' . $you . $going . "today $okay"; |
|
| 27 | +$string = 'Hello'.$there.'. How are'.$you.$going."today $okay"; |
|
| 28 | +$string = 'Hello'.$there.'. How are'.$you.$going."today $okay"; |
|
| 29 | +$string = 'Hello'.$there; |
|
| 30 | +$string = 'Hello'.$there; |
|
| 29 | 31 | $string = 'Hello'.$there; |
| 30 | -$string = 'Hello'. $there; |
|
| 31 | -$string = 'Hello' .$there; |
|
| 32 | 32 | |
| 33 | 33 | // phpcs:set Squiz.Strings.ConcatenationSpacing ignoreNewlines true |
| 34 | 34 | $y = '1' |
| 35 | 35 | . '2' |
| 36 | 36 | . '3'; |
| 37 | 37 | |
| 38 | -$y = '1' . |
|
| 39 | - '2' . |
|
| 38 | +$y = '1'. |
|
| 39 | + '2'. |
|
| 40 | 40 | '3'; |
| 41 | 41 | |
| 42 | 42 | $y = '1' |