@@ -22,7 +22,7 @@ |
||
22 | 22 | $var -= $var - 1; |
23 | 23 | $var += $var - 1; |
24 | 24 | |
25 | -$id = $id.'_'.($i-- - $x--).'_'.$x; |
|
25 | +$id = $id.'_'.($i-- -$x--).'_'.$x; |
|
26 | 26 | $id = $id.'_'.(++$i - $x--).'_'.$x; |
27 | 27 | $id = $id.'_'.(--$i - $x++).'_'.$x; |
28 | 28 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -47,13 +47,13 @@ |
||
47 | 47 | return array( |
48 | 48 | 4 => 1, |
49 | 49 | 5 => 1, |
50 | - ); |
|
50 | + ); |
|
51 | 51 | } else if (version_compare(PHP_VERSION, '5.4.0RC1') >= 0) { |
52 | 52 | // Shorthand echo is always available from PHP 5.4.0 but needed the |
53 | 53 | // short_open_tag ini var to be set for versions before this. |
54 | 54 | return array( |
55 | 55 | 4 => 1, |
56 | - ); |
|
56 | + ); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | return array(); |
@@ -28,49 +28,49 @@ |
||
28 | 28 | public function getErrorList($testFile='ComparisonOperatorUsageUnitTest.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'ComparisonOperatorUsageUnitTest.inc': |
|
32 | - return array( |
|
33 | - 6 => 1, |
|
34 | - 7 => 1, |
|
35 | - 10 => 1, |
|
36 | - 11 => 1, |
|
37 | - 18 => 1, |
|
38 | - 19 => 1, |
|
39 | - 22 => 1, |
|
40 | - 23 => 1, |
|
41 | - 29 => 2, |
|
42 | - 32 => 2, |
|
43 | - 38 => 4, |
|
44 | - 47 => 2, |
|
45 | - 69 => 1, |
|
46 | - 72 => 1, |
|
47 | - 75 => 1, |
|
48 | - 78 => 1, |
|
49 | - 80 => 1, |
|
50 | - 82 => 1, |
|
51 | - 83 => 1, |
|
52 | - 89 => 1, |
|
53 | - 92 => 1, |
|
54 | - 100 => 1, |
|
55 | - 106 => 1, |
|
56 | - 112 => 1, |
|
57 | - ); |
|
58 | - break; |
|
59 | - case 'ComparisonOperatorUsageUnitTest.js': |
|
60 | - return array( |
|
61 | - 5 => 1, |
|
62 | - 6 => 1, |
|
63 | - 17 => 1, |
|
64 | - 18 => 1, |
|
65 | - 28 => 2, |
|
66 | - 40 => 1, |
|
67 | - 47 => 1, |
|
68 | - 52 => 1, |
|
69 | - ); |
|
70 | - break; |
|
71 | - default: |
|
72 | - return array(); |
|
73 | - break; |
|
31 | + case 'ComparisonOperatorUsageUnitTest.inc': |
|
32 | + return array( |
|
33 | + 6 => 1, |
|
34 | + 7 => 1, |
|
35 | + 10 => 1, |
|
36 | + 11 => 1, |
|
37 | + 18 => 1, |
|
38 | + 19 => 1, |
|
39 | + 22 => 1, |
|
40 | + 23 => 1, |
|
41 | + 29 => 2, |
|
42 | + 32 => 2, |
|
43 | + 38 => 4, |
|
44 | + 47 => 2, |
|
45 | + 69 => 1, |
|
46 | + 72 => 1, |
|
47 | + 75 => 1, |
|
48 | + 78 => 1, |
|
49 | + 80 => 1, |
|
50 | + 82 => 1, |
|
51 | + 83 => 1, |
|
52 | + 89 => 1, |
|
53 | + 92 => 1, |
|
54 | + 100 => 1, |
|
55 | + 106 => 1, |
|
56 | + 112 => 1, |
|
57 | + ); |
|
58 | + break; |
|
59 | + case 'ComparisonOperatorUsageUnitTest.js': |
|
60 | + return array( |
|
61 | + 5 => 1, |
|
62 | + 6 => 1, |
|
63 | + 17 => 1, |
|
64 | + 18 => 1, |
|
65 | + 28 => 2, |
|
66 | + 40 => 1, |
|
67 | + 47 => 1, |
|
68 | + 52 => 1, |
|
69 | + ); |
|
70 | + break; |
|
71 | + default: |
|
72 | + return array(); |
|
73 | + break; |
|
74 | 74 | }//end switch |
75 | 75 | |
76 | 76 | }//end getErrorList() |
@@ -42,7 +42,7 @@ |
||
42 | 42 | * |
43 | 43 | * @return array<int, int> |
44 | 44 | */ |
45 | - public function getErrorList($testFile='ComparisonOperatorUsageUnitTest.inc') |
|
45 | + public function getErrorList($testFile = 'ComparisonOperatorUsageUnitTest.inc') |
|
46 | 46 | { |
47 | 47 | switch ($testFile) { |
48 | 48 | case 'ComparisonOperatorUsageUnitTest.inc': |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * its data should be counted in the grand totals. |
25 | 25 | * |
26 | 26 | * @param array $report Prepared report data. |
27 | - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. |
|
27 | + * @param File $phpcsFile The file being reported on. |
|
28 | 28 | * @param bool $showSources Show sources? |
29 | 29 | * @param int $width Maximum allowed line width. |
30 | 30 | * |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @return bool |
32 | 32 | */ |
33 | - public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) |
|
33 | + public function generateFileReport($report, File $phpcsFile, $showSources = false, $width = 80) |
|
34 | 34 | { |
35 | 35 | if ($report['errors'] === 0 && $report['warnings'] === 0) { |
36 | 36 | // Nothing to print. |
@@ -333,10 +333,10 @@ discard block |
||
333 | 333 | $totalErrors, |
334 | 334 | $totalWarnings, |
335 | 335 | $totalFixable, |
336 | - $showSources=false, |
|
337 | - $width=80, |
|
338 | - $interactive=false, |
|
339 | - $toScreen=true |
|
336 | + $showSources = false, |
|
337 | + $width = 80, |
|
338 | + $interactive = false, |
|
339 | + $toScreen = true |
|
340 | 340 | ) { |
341 | 341 | if ($cachedData === '') { |
342 | 342 | return; |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * its data should be counted in the grand totals. |
25 | 25 | * |
26 | 26 | * @param array $report Prepared report data. |
27 | - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. |
|
27 | + * @param File $phpcsFile The file being reported on. |
|
28 | 28 | * @param bool $showSources Show sources? |
29 | 29 | * @param int $width Maximum allowed line width. |
30 | 30 | * |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @return bool |
32 | 32 | */ |
33 | - public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) |
|
33 | + public function generateFileReport($report, File $phpcsFile, $showSources = false, $width = 80) |
|
34 | 34 | { |
35 | 35 | if ($report['errors'] === 0 && $report['warnings'] === 0) { |
36 | 36 | // Nothing to print. |
@@ -333,10 +333,10 @@ discard block |
||
333 | 333 | $totalErrors, |
334 | 334 | $totalWarnings, |
335 | 335 | $totalFixable, |
336 | - $showSources=false, |
|
337 | - $width=80, |
|
338 | - $interactive=false, |
|
339 | - $toScreen=true |
|
336 | + $showSources = false, |
|
337 | + $width = 80, |
|
338 | + $interactive = false, |
|
339 | + $toScreen = true |
|
340 | 340 | ) { |
341 | 341 | if ($cachedData === '') { |
342 | 342 | return; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * Registers the tokens that this sniff wants to listen for. |
34 | 34 | * |
35 | - * @return int[] |
|
35 | + * @return integer[] |
|
36 | 36 | */ |
37 | 37 | public function register() |
38 | 38 | { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * Processes this test, when one of its tokens is encountered. |
46 | 46 | * |
47 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
47 | + * @param File $phpcsFile The file being scanned. |
|
48 | 48 | * @param int $stackPtr The position of the current token |
49 | 49 | * in the stack passed in $tokens. |
50 | 50 | * |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Returns the token types that this sniff is interested in. |
29 | 29 | * |
30 | - * @return int[] |
|
30 | + * @return integer[] |
|
31 | 31 | */ |
32 | 32 | public function register() |
33 | 33 | { |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Processes the tokens that this sniff is interested in. |
41 | 41 | * |
42 | - * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found. |
|
42 | + * @param File $phpcsFile The file where the token was found. |
|
43 | 43 | * @param int $stackPtr The position in the stack where |
44 | 44 | * the token was found. |
45 | 45 | * |
46 | - * @return void |
|
46 | + * @return null|integer |
|
47 | 47 | * @throws PHP_CodeSniffer_Exception If jslint.js could not be run |
48 | 48 | */ |
49 | 49 | public function process(File $phpcsFile, $stackPtr) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Returns an array of tokens this test wants to listen for. |
32 | 32 | * |
33 | - * @return array |
|
33 | + * @return string[] |
|
34 | 34 | */ |
35 | 35 | public function register() |
36 | 36 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Processes this test, when one of its tokens is encountered. |
44 | 44 | * |
45 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
45 | + * @param File $phpcsFile The file being scanned. |
|
46 | 46 | * @param int $stackPtr The position of the current token |
47 | 47 | * in the stack passed in $tokens. |
48 | 48 | * |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Returns an array of tokens this test wants to listen for. |
32 | 32 | * |
33 | - * @return array |
|
33 | + * @return string[] |
|
34 | 34 | */ |
35 | 35 | public function register() |
36 | 36 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Processes this test, when one of its tokens is encountered. |
44 | 44 | * |
45 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
45 | + * @param File $phpcsFile The file being scanned. |
|
46 | 46 | * @param int $stackPtr The position of the current token |
47 | 47 | * in the stack passed in $tokens. |
48 | 48 | * |