@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | T_ELSEIF, |
63 | 63 | T_TRY, |
64 | 64 | T_CATCH, |
65 | - ); |
|
65 | + ); |
|
66 | 66 | |
67 | 67 | }//end register() |
68 | 68 | |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) { |
105 | 105 | $error = 'Expected %s spaces after opening bracket; %s found'; |
106 | 106 | $data = array( |
107 | - $this->requiredSpacesAfterOpen, |
|
108 | - $spaceAfterOpen, |
|
109 | - ); |
|
107 | + $this->requiredSpacesAfterOpen, |
|
108 | + $spaceAfterOpen, |
|
109 | + ); |
|
110 | 110 | $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data); |
111 | 111 | if ($fix === true) { |
112 | 112 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) { |
132 | 132 | $error = 'Expected %s spaces before closing bracket; %s found'; |
133 | 133 | $data = array( |
134 | - $this->requiredSpacesBeforeClose, |
|
135 | - $spaceBeforeClose, |
|
136 | - ); |
|
134 | + $this->requiredSpacesBeforeClose, |
|
135 | + $spaceBeforeClose, |
|
136 | + ); |
|
137 | 137 | $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data); |
138 | 138 | if ($fix === true) { |
139 | 139 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->requiredSpacesAfterOpen, |
108 | 108 | $spaceAfterOpen, |
109 | 109 | ); |
110 | - $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data); |
|
110 | + $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data); |
|
111 | 111 | if ($fix === true) { |
112 | 112 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
113 | 113 | if ($spaceAfterOpen === 0) { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $this->requiredSpacesBeforeClose, |
135 | 135 | $spaceBeforeClose, |
136 | 136 | ); |
137 | - $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data); |
|
137 | + $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data); |
|
138 | 138 | if ($fix === true) { |
139 | 139 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
140 | 140 | if ($spaceBeforeClose === 0) { |
@@ -28,15 +28,15 @@ |
||
28 | 28 | public function getErrorList($testFile='') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'EndFileNewlineUnitTest.1.inc': |
|
32 | - case 'EndFileNewlineUnitTest.3.inc': |
|
33 | - case 'EndFileNewlineUnitTest.6.inc': |
|
34 | - case 'EndFileNewlineUnitTest.7.inc': |
|
35 | - return array(2 => 1); |
|
36 | - break; |
|
37 | - default: |
|
38 | - return array(); |
|
39 | - break; |
|
31 | + case 'EndFileNewlineUnitTest.1.inc': |
|
32 | + case 'EndFileNewlineUnitTest.3.inc': |
|
33 | + case 'EndFileNewlineUnitTest.6.inc': |
|
34 | + case 'EndFileNewlineUnitTest.7.inc': |
|
35 | + return array(2 => 1); |
|
36 | + break; |
|
37 | + default: |
|
38 | + return array(); |
|
39 | + break; |
|
40 | 40 | }//end switch |
41 | 41 | |
42 | 42 | }//end getErrorList() |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='') |
|
43 | + public function getErrorList($testFile = '') |
|
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | 46 | case 'EndFileNoNewlineUnitTest.1.inc': |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @return array<int, int> |
77 | 77 | */ |
78 | - public function getWarningList($testFile='') |
|
78 | + public function getWarningList($testFile = '') |
|
79 | 79 | { |
80 | 80 | return array(); |
81 | 81 |
@@ -43,15 +43,15 @@ |
||
43 | 43 | public function getErrorList($testFile='') |
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | - case 'ClosingTagUnitTest.1.inc': |
|
47 | - return array(11 => 1); |
|
46 | + case 'ClosingTagUnitTest.1.inc': |
|
47 | + return array(11 => 1); |
|
48 | 48 | |
49 | - case 'ClosingTagUnitTest.4.inc': |
|
50 | - case 'ClosingTagUnitTest.5.inc': |
|
51 | - return array(1 => 1); |
|
49 | + case 'ClosingTagUnitTest.4.inc': |
|
50 | + case 'ClosingTagUnitTest.5.inc': |
|
51 | + return array(1 => 1); |
|
52 | 52 | |
53 | - default: |
|
54 | - return array(); |
|
53 | + default: |
|
54 | + return array(); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | }//end getErrorList() |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='') |
|
43 | + public function getErrorList($testFile = '') |
|
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | 46 | case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
@@ -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(); |
@@ -43,19 +43,19 @@ |
||
43 | 43 | public function getErrorList($testFile='') |
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | - case 'UseDeclarationUnitTest.2.inc': |
|
47 | - return array( |
|
48 | - 4 => 1, |
|
49 | - 5 => 1, |
|
50 | - 10 => 2, |
|
51 | - ); |
|
52 | - case 'UseDeclarationUnitTest.3.inc': |
|
53 | - return array( |
|
54 | - 4 => 1, |
|
55 | - 6 => 1, |
|
56 | - ); |
|
57 | - default: |
|
58 | - return array(); |
|
46 | + case 'UseDeclarationUnitTest.2.inc': |
|
47 | + return array( |
|
48 | + 4 => 1, |
|
49 | + 5 => 1, |
|
50 | + 10 => 2, |
|
51 | + ); |
|
52 | + case 'UseDeclarationUnitTest.3.inc': |
|
53 | + return array( |
|
54 | + 4 => 1, |
|
55 | + 6 => 1, |
|
56 | + ); |
|
57 | + default: |
|
58 | + return array(); |
|
59 | 59 | }//end switch |
60 | 60 | |
61 | 61 | }//end getErrorList() |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='') |
|
43 | + public function getErrorList($testFile = '') |
|
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | 46 | case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ($something) { |
3 | 3 | } |
4 | -foreach ($this as $that ) { |
|
4 | +foreach ($this as $that) { |
|
5 | 5 | } |
6 | 6 | while (true) { |
7 | 7 | for ($i = 0; $i < 10; $i++) { |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | foreach ($this as $that) { |
13 | 13 | do { |
14 | - } while ( true ); |
|
14 | + } while (true); |
|
15 | 15 | |
16 | 16 | } |
17 | 17 | } |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | $settingsUpdated = FALSE; |
24 | 24 | } |
25 | 25 | |
26 | -foreach ( $blah as $var ) { |
|
27 | - if ( $blah ) { |
|
26 | +foreach ($blah as $var) { |
|
27 | + if ($blah) { |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | // @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 1 |
40 | 40 | // @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 1 |
41 | 41 | foreach ($something as $blah => $that) {} |
42 | -foreach ( $something as $blah => $that ) {} |
|
43 | -foreach ( $something as $blah => $that ) {} |
|
42 | +foreach ($something as $blah => $that) {} |
|
43 | +foreach ($something as $blah => $that) {} |
|
44 | 44 | // @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 0 |
45 | 45 | // @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 0 |
46 | 46 |