@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return array<int, int> |
| 27 | 27 | */ |
| 28 | - public function getErrorList($testFile='OperatorSpacingUnitTest.inc') |
|
| 28 | + public function getErrorList($testFile = 'OperatorSpacingUnitTest.inc') |
|
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | 31 | case 'OperatorSpacingUnitTest.inc': |
@@ -15,156 +15,156 @@ |
||
| 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='OperatorSpacingUnitTest.inc') |
|
| 29 | - { |
|
| 30 | - switch ($testFile) { |
|
| 31 | - case 'OperatorSpacingUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 4 => 1, |
|
| 34 | - 5 => 2, |
|
| 35 | - 6 => 1, |
|
| 36 | - 7 => 1, |
|
| 37 | - 8 => 2, |
|
| 38 | - 11 => 1, |
|
| 39 | - 12 => 2, |
|
| 40 | - 13 => 1, |
|
| 41 | - 14 => 1, |
|
| 42 | - 15 => 2, |
|
| 43 | - 18 => 1, |
|
| 44 | - 19 => 2, |
|
| 45 | - 20 => 1, |
|
| 46 | - 21 => 1, |
|
| 47 | - 22 => 2, |
|
| 48 | - 25 => 1, |
|
| 49 | - 26 => 2, |
|
| 50 | - 27 => 1, |
|
| 51 | - 28 => 1, |
|
| 52 | - 29 => 2, |
|
| 53 | - 32 => 1, |
|
| 54 | - 33 => 2, |
|
| 55 | - 34 => 1, |
|
| 56 | - 35 => 1, |
|
| 57 | - 36 => 2, |
|
| 58 | - 40 => 2, |
|
| 59 | - 42 => 2, |
|
| 60 | - 44 => 2, |
|
| 61 | - 45 => 1, |
|
| 62 | - 46 => 2, |
|
| 63 | - 53 => 4, |
|
| 64 | - 54 => 3, |
|
| 65 | - 59 => 10, |
|
| 66 | - 64 => 1, |
|
| 67 | - 77 => 4, |
|
| 68 | - 78 => 1, |
|
| 69 | - 79 => 1, |
|
| 70 | - 80 => 2, |
|
| 71 | - 81 => 1, |
|
| 72 | - 84 => 6, |
|
| 73 | - 85 => 6, |
|
| 74 | - 87 => 4, |
|
| 75 | - 88 => 5, |
|
| 76 | - 90 => 4, |
|
| 77 | - 91 => 5, |
|
| 78 | - 128 => 4, |
|
| 79 | - 132 => 1, |
|
| 80 | - 133 => 1, |
|
| 81 | - 135 => 1, |
|
| 82 | - 136 => 1, |
|
| 83 | - 140 => 1, |
|
| 84 | - 141 => 1, |
|
| 85 | - 174 => 1, |
|
| 86 | - 177 => 1, |
|
| 87 | - 178 => 1, |
|
| 88 | - 179 => 1, |
|
| 89 | - 185 => 2, |
|
| 90 | - 191 => 4, |
|
| 91 | - 194 => 1, |
|
| 92 | - 195 => 1, |
|
| 93 | - 196 => 2, |
|
| 94 | - 199 => 1, |
|
| 95 | - 200 => 1, |
|
| 96 | - 201 => 2, |
|
| 97 | - 239 => 1, |
|
| 98 | - 246 => 1, |
|
| 99 | - 265 => 2, |
|
| 100 | - 266 => 2, |
|
| 101 | - 271 => 2, |
|
| 102 | - ]; |
|
| 103 | - break; |
|
| 104 | - case 'OperatorSpacingUnitTest.js': |
|
| 105 | - return [ |
|
| 106 | - 4 => 1, |
|
| 107 | - 5 => 2, |
|
| 108 | - 6 => 1, |
|
| 109 | - 7 => 1, |
|
| 110 | - 8 => 2, |
|
| 111 | - 11 => 1, |
|
| 112 | - 12 => 2, |
|
| 113 | - 13 => 1, |
|
| 114 | - 14 => 1, |
|
| 115 | - 15 => 2, |
|
| 116 | - 18 => 1, |
|
| 117 | - 19 => 2, |
|
| 118 | - 20 => 1, |
|
| 119 | - 21 => 1, |
|
| 120 | - 22 => 2, |
|
| 121 | - 25 => 1, |
|
| 122 | - 26 => 2, |
|
| 123 | - 27 => 1, |
|
| 124 | - 28 => 1, |
|
| 125 | - 29 => 2, |
|
| 126 | - 32 => 1, |
|
| 127 | - 33 => 2, |
|
| 128 | - 34 => 1, |
|
| 129 | - 35 => 1, |
|
| 130 | - 36 => 2, |
|
| 131 | - 40 => 2, |
|
| 132 | - 42 => 2, |
|
| 133 | - 44 => 2, |
|
| 134 | - 45 => 1, |
|
| 135 | - 46 => 2, |
|
| 136 | - 55 => 4, |
|
| 137 | - 65 => 1, |
|
| 138 | - 66 => 1, |
|
| 139 | - 68 => 1, |
|
| 140 | - 69 => 1, |
|
| 141 | - 73 => 1, |
|
| 142 | - 74 => 1, |
|
| 143 | - 100 => 1, |
|
| 144 | - 103 => 2, |
|
| 145 | - ]; |
|
| 146 | - break; |
|
| 147 | - default: |
|
| 148 | - return []; |
|
| 149 | - break; |
|
| 150 | - }//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='OperatorSpacingUnitTest.inc') |
|
| 29 | + { |
|
| 30 | + switch ($testFile) { |
|
| 31 | + case 'OperatorSpacingUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 4 => 1, |
|
| 34 | + 5 => 2, |
|
| 35 | + 6 => 1, |
|
| 36 | + 7 => 1, |
|
| 37 | + 8 => 2, |
|
| 38 | + 11 => 1, |
|
| 39 | + 12 => 2, |
|
| 40 | + 13 => 1, |
|
| 41 | + 14 => 1, |
|
| 42 | + 15 => 2, |
|
| 43 | + 18 => 1, |
|
| 44 | + 19 => 2, |
|
| 45 | + 20 => 1, |
|
| 46 | + 21 => 1, |
|
| 47 | + 22 => 2, |
|
| 48 | + 25 => 1, |
|
| 49 | + 26 => 2, |
|
| 50 | + 27 => 1, |
|
| 51 | + 28 => 1, |
|
| 52 | + 29 => 2, |
|
| 53 | + 32 => 1, |
|
| 54 | + 33 => 2, |
|
| 55 | + 34 => 1, |
|
| 56 | + 35 => 1, |
|
| 57 | + 36 => 2, |
|
| 58 | + 40 => 2, |
|
| 59 | + 42 => 2, |
|
| 60 | + 44 => 2, |
|
| 61 | + 45 => 1, |
|
| 62 | + 46 => 2, |
|
| 63 | + 53 => 4, |
|
| 64 | + 54 => 3, |
|
| 65 | + 59 => 10, |
|
| 66 | + 64 => 1, |
|
| 67 | + 77 => 4, |
|
| 68 | + 78 => 1, |
|
| 69 | + 79 => 1, |
|
| 70 | + 80 => 2, |
|
| 71 | + 81 => 1, |
|
| 72 | + 84 => 6, |
|
| 73 | + 85 => 6, |
|
| 74 | + 87 => 4, |
|
| 75 | + 88 => 5, |
|
| 76 | + 90 => 4, |
|
| 77 | + 91 => 5, |
|
| 78 | + 128 => 4, |
|
| 79 | + 132 => 1, |
|
| 80 | + 133 => 1, |
|
| 81 | + 135 => 1, |
|
| 82 | + 136 => 1, |
|
| 83 | + 140 => 1, |
|
| 84 | + 141 => 1, |
|
| 85 | + 174 => 1, |
|
| 86 | + 177 => 1, |
|
| 87 | + 178 => 1, |
|
| 88 | + 179 => 1, |
|
| 89 | + 185 => 2, |
|
| 90 | + 191 => 4, |
|
| 91 | + 194 => 1, |
|
| 92 | + 195 => 1, |
|
| 93 | + 196 => 2, |
|
| 94 | + 199 => 1, |
|
| 95 | + 200 => 1, |
|
| 96 | + 201 => 2, |
|
| 97 | + 239 => 1, |
|
| 98 | + 246 => 1, |
|
| 99 | + 265 => 2, |
|
| 100 | + 266 => 2, |
|
| 101 | + 271 => 2, |
|
| 102 | + ]; |
|
| 103 | + break; |
|
| 104 | + case 'OperatorSpacingUnitTest.js': |
|
| 105 | + return [ |
|
| 106 | + 4 => 1, |
|
| 107 | + 5 => 2, |
|
| 108 | + 6 => 1, |
|
| 109 | + 7 => 1, |
|
| 110 | + 8 => 2, |
|
| 111 | + 11 => 1, |
|
| 112 | + 12 => 2, |
|
| 113 | + 13 => 1, |
|
| 114 | + 14 => 1, |
|
| 115 | + 15 => 2, |
|
| 116 | + 18 => 1, |
|
| 117 | + 19 => 2, |
|
| 118 | + 20 => 1, |
|
| 119 | + 21 => 1, |
|
| 120 | + 22 => 2, |
|
| 121 | + 25 => 1, |
|
| 122 | + 26 => 2, |
|
| 123 | + 27 => 1, |
|
| 124 | + 28 => 1, |
|
| 125 | + 29 => 2, |
|
| 126 | + 32 => 1, |
|
| 127 | + 33 => 2, |
|
| 128 | + 34 => 1, |
|
| 129 | + 35 => 1, |
|
| 130 | + 36 => 2, |
|
| 131 | + 40 => 2, |
|
| 132 | + 42 => 2, |
|
| 133 | + 44 => 2, |
|
| 134 | + 45 => 1, |
|
| 135 | + 46 => 2, |
|
| 136 | + 55 => 4, |
|
| 137 | + 65 => 1, |
|
| 138 | + 66 => 1, |
|
| 139 | + 68 => 1, |
|
| 140 | + 69 => 1, |
|
| 141 | + 73 => 1, |
|
| 142 | + 74 => 1, |
|
| 143 | + 100 => 1, |
|
| 144 | + 103 => 2, |
|
| 145 | + ]; |
|
| 146 | + break; |
|
| 147 | + default: |
|
| 148 | + return []; |
|
| 149 | + break; |
|
| 150 | + }//end switch |
|
| 151 | 151 | |
| 152 | - }//end getErrorList() |
|
| 152 | + }//end getErrorList() |
|
| 153 | 153 | |
| 154 | 154 | |
| 155 | - /** |
|
| 156 | - * Returns the lines where warnings should occur. |
|
| 157 | - * |
|
| 158 | - * The key of the array should represent the line number and the value |
|
| 159 | - * should represent the number of warnings that should occur on that line. |
|
| 160 | - * |
|
| 161 | - * @return array<int, int> |
|
| 162 | - */ |
|
| 163 | - public function getWarningList() |
|
| 164 | - { |
|
| 165 | - return []; |
|
| 155 | + /** |
|
| 156 | + * Returns the lines where warnings should occur. |
|
| 157 | + * |
|
| 158 | + * The key of the array should represent the line number and the value |
|
| 159 | + * should represent the number of warnings that should occur on that line. |
|
| 160 | + * |
|
| 161 | + * @return array<int, int> |
|
| 162 | + */ |
|
| 163 | + public function getWarningList() |
|
| 164 | + { |
|
| 165 | + return []; |
|
| 166 | 166 | |
| 167 | - }//end getWarningList() |
|
| 167 | + }//end getWarningList() |
|
| 168 | 168 | |
| 169 | 169 | |
| 170 | 170 | }//end class |
@@ -28,125 +28,125 @@ |
||
| 28 | 28 | public function getErrorList($testFile='OperatorSpacingUnitTest.inc') |
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | - case 'OperatorSpacingUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 4 => 1, |
|
| 34 | - 5 => 2, |
|
| 35 | - 6 => 1, |
|
| 36 | - 7 => 1, |
|
| 37 | - 8 => 2, |
|
| 38 | - 11 => 1, |
|
| 39 | - 12 => 2, |
|
| 40 | - 13 => 1, |
|
| 41 | - 14 => 1, |
|
| 42 | - 15 => 2, |
|
| 43 | - 18 => 1, |
|
| 44 | - 19 => 2, |
|
| 45 | - 20 => 1, |
|
| 46 | - 21 => 1, |
|
| 47 | - 22 => 2, |
|
| 48 | - 25 => 1, |
|
| 49 | - 26 => 2, |
|
| 50 | - 27 => 1, |
|
| 51 | - 28 => 1, |
|
| 52 | - 29 => 2, |
|
| 53 | - 32 => 1, |
|
| 54 | - 33 => 2, |
|
| 55 | - 34 => 1, |
|
| 56 | - 35 => 1, |
|
| 57 | - 36 => 2, |
|
| 58 | - 40 => 2, |
|
| 59 | - 42 => 2, |
|
| 60 | - 44 => 2, |
|
| 61 | - 45 => 1, |
|
| 62 | - 46 => 2, |
|
| 63 | - 53 => 4, |
|
| 64 | - 54 => 3, |
|
| 65 | - 59 => 10, |
|
| 66 | - 64 => 1, |
|
| 67 | - 77 => 4, |
|
| 68 | - 78 => 1, |
|
| 69 | - 79 => 1, |
|
| 70 | - 80 => 2, |
|
| 71 | - 81 => 1, |
|
| 72 | - 84 => 6, |
|
| 73 | - 85 => 6, |
|
| 74 | - 87 => 4, |
|
| 75 | - 88 => 5, |
|
| 76 | - 90 => 4, |
|
| 77 | - 91 => 5, |
|
| 78 | - 128 => 4, |
|
| 79 | - 132 => 1, |
|
| 80 | - 133 => 1, |
|
| 81 | - 135 => 1, |
|
| 82 | - 136 => 1, |
|
| 83 | - 140 => 1, |
|
| 84 | - 141 => 1, |
|
| 85 | - 174 => 1, |
|
| 86 | - 177 => 1, |
|
| 87 | - 178 => 1, |
|
| 88 | - 179 => 1, |
|
| 89 | - 185 => 2, |
|
| 90 | - 191 => 4, |
|
| 91 | - 194 => 1, |
|
| 92 | - 195 => 1, |
|
| 93 | - 196 => 2, |
|
| 94 | - 199 => 1, |
|
| 95 | - 200 => 1, |
|
| 96 | - 201 => 2, |
|
| 97 | - 239 => 1, |
|
| 98 | - 246 => 1, |
|
| 99 | - 265 => 2, |
|
| 100 | - 266 => 2, |
|
| 101 | - 271 => 2, |
|
| 102 | - ]; |
|
| 103 | - break; |
|
| 104 | - case 'OperatorSpacingUnitTest.js': |
|
| 105 | - return [ |
|
| 106 | - 4 => 1, |
|
| 107 | - 5 => 2, |
|
| 108 | - 6 => 1, |
|
| 109 | - 7 => 1, |
|
| 110 | - 8 => 2, |
|
| 111 | - 11 => 1, |
|
| 112 | - 12 => 2, |
|
| 113 | - 13 => 1, |
|
| 114 | - 14 => 1, |
|
| 115 | - 15 => 2, |
|
| 116 | - 18 => 1, |
|
| 117 | - 19 => 2, |
|
| 118 | - 20 => 1, |
|
| 119 | - 21 => 1, |
|
| 120 | - 22 => 2, |
|
| 121 | - 25 => 1, |
|
| 122 | - 26 => 2, |
|
| 123 | - 27 => 1, |
|
| 124 | - 28 => 1, |
|
| 125 | - 29 => 2, |
|
| 126 | - 32 => 1, |
|
| 127 | - 33 => 2, |
|
| 128 | - 34 => 1, |
|
| 129 | - 35 => 1, |
|
| 130 | - 36 => 2, |
|
| 131 | - 40 => 2, |
|
| 132 | - 42 => 2, |
|
| 133 | - 44 => 2, |
|
| 134 | - 45 => 1, |
|
| 135 | - 46 => 2, |
|
| 136 | - 55 => 4, |
|
| 137 | - 65 => 1, |
|
| 138 | - 66 => 1, |
|
| 139 | - 68 => 1, |
|
| 140 | - 69 => 1, |
|
| 141 | - 73 => 1, |
|
| 142 | - 74 => 1, |
|
| 143 | - 100 => 1, |
|
| 144 | - 103 => 2, |
|
| 145 | - ]; |
|
| 146 | - break; |
|
| 147 | - default: |
|
| 148 | - return []; |
|
| 149 | - break; |
|
| 31 | + case 'OperatorSpacingUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 4 => 1, |
|
| 34 | + 5 => 2, |
|
| 35 | + 6 => 1, |
|
| 36 | + 7 => 1, |
|
| 37 | + 8 => 2, |
|
| 38 | + 11 => 1, |
|
| 39 | + 12 => 2, |
|
| 40 | + 13 => 1, |
|
| 41 | + 14 => 1, |
|
| 42 | + 15 => 2, |
|
| 43 | + 18 => 1, |
|
| 44 | + 19 => 2, |
|
| 45 | + 20 => 1, |
|
| 46 | + 21 => 1, |
|
| 47 | + 22 => 2, |
|
| 48 | + 25 => 1, |
|
| 49 | + 26 => 2, |
|
| 50 | + 27 => 1, |
|
| 51 | + 28 => 1, |
|
| 52 | + 29 => 2, |
|
| 53 | + 32 => 1, |
|
| 54 | + 33 => 2, |
|
| 55 | + 34 => 1, |
|
| 56 | + 35 => 1, |
|
| 57 | + 36 => 2, |
|
| 58 | + 40 => 2, |
|
| 59 | + 42 => 2, |
|
| 60 | + 44 => 2, |
|
| 61 | + 45 => 1, |
|
| 62 | + 46 => 2, |
|
| 63 | + 53 => 4, |
|
| 64 | + 54 => 3, |
|
| 65 | + 59 => 10, |
|
| 66 | + 64 => 1, |
|
| 67 | + 77 => 4, |
|
| 68 | + 78 => 1, |
|
| 69 | + 79 => 1, |
|
| 70 | + 80 => 2, |
|
| 71 | + 81 => 1, |
|
| 72 | + 84 => 6, |
|
| 73 | + 85 => 6, |
|
| 74 | + 87 => 4, |
|
| 75 | + 88 => 5, |
|
| 76 | + 90 => 4, |
|
| 77 | + 91 => 5, |
|
| 78 | + 128 => 4, |
|
| 79 | + 132 => 1, |
|
| 80 | + 133 => 1, |
|
| 81 | + 135 => 1, |
|
| 82 | + 136 => 1, |
|
| 83 | + 140 => 1, |
|
| 84 | + 141 => 1, |
|
| 85 | + 174 => 1, |
|
| 86 | + 177 => 1, |
|
| 87 | + 178 => 1, |
|
| 88 | + 179 => 1, |
|
| 89 | + 185 => 2, |
|
| 90 | + 191 => 4, |
|
| 91 | + 194 => 1, |
|
| 92 | + 195 => 1, |
|
| 93 | + 196 => 2, |
|
| 94 | + 199 => 1, |
|
| 95 | + 200 => 1, |
|
| 96 | + 201 => 2, |
|
| 97 | + 239 => 1, |
|
| 98 | + 246 => 1, |
|
| 99 | + 265 => 2, |
|
| 100 | + 266 => 2, |
|
| 101 | + 271 => 2, |
|
| 102 | + ]; |
|
| 103 | + break; |
|
| 104 | + case 'OperatorSpacingUnitTest.js': |
|
| 105 | + return [ |
|
| 106 | + 4 => 1, |
|
| 107 | + 5 => 2, |
|
| 108 | + 6 => 1, |
|
| 109 | + 7 => 1, |
|
| 110 | + 8 => 2, |
|
| 111 | + 11 => 1, |
|
| 112 | + 12 => 2, |
|
| 113 | + 13 => 1, |
|
| 114 | + 14 => 1, |
|
| 115 | + 15 => 2, |
|
| 116 | + 18 => 1, |
|
| 117 | + 19 => 2, |
|
| 118 | + 20 => 1, |
|
| 119 | + 21 => 1, |
|
| 120 | + 22 => 2, |
|
| 121 | + 25 => 1, |
|
| 122 | + 26 => 2, |
|
| 123 | + 27 => 1, |
|
| 124 | + 28 => 1, |
|
| 125 | + 29 => 2, |
|
| 126 | + 32 => 1, |
|
| 127 | + 33 => 2, |
|
| 128 | + 34 => 1, |
|
| 129 | + 35 => 1, |
|
| 130 | + 36 => 2, |
|
| 131 | + 40 => 2, |
|
| 132 | + 42 => 2, |
|
| 133 | + 44 => 2, |
|
| 134 | + 45 => 1, |
|
| 135 | + 46 => 2, |
|
| 136 | + 55 => 4, |
|
| 137 | + 65 => 1, |
|
| 138 | + 66 => 1, |
|
| 139 | + 68 => 1, |
|
| 140 | + 69 => 1, |
|
| 141 | + 73 => 1, |
|
| 142 | + 74 => 1, |
|
| 143 | + 100 => 1, |
|
| 144 | + 103 => 2, |
|
| 145 | + ]; |
|
| 146 | + break; |
|
| 147 | + default: |
|
| 148 | + return []; |
|
| 149 | + break; |
|
| 150 | 150 | }//end switch |
| 151 | 151 | |
| 152 | 152 | }//end getErrorList() |
@@ -2,33 +2,33 @@ |
||
| 2 | 2 | |
| 3 | 3 | function MyFunction1() |
| 4 | 4 | { |
| 5 | - // Some code goes here. |
|
| 6 | - echo $code; |
|
| 5 | + // Some code goes here. |
|
| 6 | + echo $code; |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | function MyFunction2() |
| 10 | 10 | { |
| 11 | 11 | |
| 12 | - // Some code goes here. |
|
| 13 | - echo $code; |
|
| 12 | + // Some code goes here. |
|
| 13 | + echo $code; |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | class MyClass |
| 17 | 17 | { |
| 18 | - function MyFunction1() |
|
| 19 | - { |
|
| 20 | - // Some code goes here. |
|
| 21 | - echo $code; |
|
| 22 | - } |
|
| 18 | + function MyFunction1() |
|
| 19 | + { |
|
| 20 | + // Some code goes here. |
|
| 21 | + echo $code; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - function MyFunction2() |
|
| 25 | - { |
|
| 24 | + function MyFunction2() |
|
| 25 | + { |
|
| 26 | 26 | |
| 27 | - // Some code goes here. |
|
| 28 | - echo $code; |
|
| 29 | - } |
|
| 27 | + // Some code goes here. |
|
| 28 | + echo $code; |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - public function register(); |
|
| 31 | + public function register(); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | function emptyFunction() |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return array<int, int> |
| 27 | 27 | */ |
| 28 | - public function getErrorList($testFile='SemicolonSpacingUnitTest.inc') |
|
| 28 | + public function getErrorList($testFile = 'SemicolonSpacingUnitTest.inc') |
|
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | 31 | case 'SemicolonSpacingUnitTest.inc': |
@@ -15,69 +15,69 @@ |
||
| 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='SemicolonSpacingUnitTest.inc') |
|
| 29 | - { |
|
| 30 | - switch ($testFile) { |
|
| 31 | - case 'SemicolonSpacingUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 3 => 1, |
|
| 34 | - 4 => 1, |
|
| 35 | - 5 => 2, |
|
| 36 | - 6 => 1, |
|
| 37 | - 8 => 1, |
|
| 38 | - 9 => 1, |
|
| 39 | - 14 => 1, |
|
| 40 | - 16 => 1, |
|
| 41 | - 18 => 1, |
|
| 42 | - 29 => 1, |
|
| 43 | - 30 => 2, |
|
| 44 | - 36 => 1, |
|
| 45 | - ]; |
|
| 46 | - break; |
|
| 47 | - case 'SemicolonSpacingUnitTest.js': |
|
| 48 | - return [ |
|
| 49 | - 3 => 1, |
|
| 50 | - 4 => 1, |
|
| 51 | - 6 => 1, |
|
| 52 | - 10 => 2, |
|
| 53 | - 11 => 1, |
|
| 54 | - 13 => 1, |
|
| 55 | - 19 => 1, |
|
| 56 | - 22 => 1, |
|
| 57 | - 25 => 1, |
|
| 58 | - ]; |
|
| 59 | - break; |
|
| 60 | - default: |
|
| 61 | - return []; |
|
| 62 | - break; |
|
| 63 | - }//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='SemicolonSpacingUnitTest.inc') |
|
| 29 | + { |
|
| 30 | + switch ($testFile) { |
|
| 31 | + case 'SemicolonSpacingUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 3 => 1, |
|
| 34 | + 4 => 1, |
|
| 35 | + 5 => 2, |
|
| 36 | + 6 => 1, |
|
| 37 | + 8 => 1, |
|
| 38 | + 9 => 1, |
|
| 39 | + 14 => 1, |
|
| 40 | + 16 => 1, |
|
| 41 | + 18 => 1, |
|
| 42 | + 29 => 1, |
|
| 43 | + 30 => 2, |
|
| 44 | + 36 => 1, |
|
| 45 | + ]; |
|
| 46 | + break; |
|
| 47 | + case 'SemicolonSpacingUnitTest.js': |
|
| 48 | + return [ |
|
| 49 | + 3 => 1, |
|
| 50 | + 4 => 1, |
|
| 51 | + 6 => 1, |
|
| 52 | + 10 => 2, |
|
| 53 | + 11 => 1, |
|
| 54 | + 13 => 1, |
|
| 55 | + 19 => 1, |
|
| 56 | + 22 => 1, |
|
| 57 | + 25 => 1, |
|
| 58 | + ]; |
|
| 59 | + break; |
|
| 60 | + default: |
|
| 61 | + return []; |
|
| 62 | + break; |
|
| 63 | + }//end switch |
|
| 64 | 64 | |
| 65 | - }//end getErrorList() |
|
| 65 | + }//end getErrorList() |
|
| 66 | 66 | |
| 67 | 67 | |
| 68 | - /** |
|
| 69 | - * Returns the lines where warnings should occur. |
|
| 70 | - * |
|
| 71 | - * The key of the array should represent the line number and the value |
|
| 72 | - * should represent the number of warnings that should occur on that line. |
|
| 73 | - * |
|
| 74 | - * @return array<int, int> |
|
| 75 | - */ |
|
| 76 | - public function getWarningList() |
|
| 77 | - { |
|
| 78 | - return []; |
|
| 68 | + /** |
|
| 69 | + * Returns the lines where warnings should occur. |
|
| 70 | + * |
|
| 71 | + * The key of the array should represent the line number and the value |
|
| 72 | + * should represent the number of warnings that should occur on that line. |
|
| 73 | + * |
|
| 74 | + * @return array<int, int> |
|
| 75 | + */ |
|
| 76 | + public function getWarningList() |
|
| 77 | + { |
|
| 78 | + return []; |
|
| 79 | 79 | |
| 80 | - }//end getWarningList() |
|
| 80 | + }//end getWarningList() |
|
| 81 | 81 | |
| 82 | 82 | |
| 83 | 83 | }//end class |
@@ -28,38 +28,38 @@ |
||
| 28 | 28 | public function getErrorList($testFile='SemicolonSpacingUnitTest.inc') |
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | - case 'SemicolonSpacingUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 3 => 1, |
|
| 34 | - 4 => 1, |
|
| 35 | - 5 => 2, |
|
| 36 | - 6 => 1, |
|
| 37 | - 8 => 1, |
|
| 38 | - 9 => 1, |
|
| 39 | - 14 => 1, |
|
| 40 | - 16 => 1, |
|
| 41 | - 18 => 1, |
|
| 42 | - 29 => 1, |
|
| 43 | - 30 => 2, |
|
| 44 | - 36 => 1, |
|
| 45 | - ]; |
|
| 46 | - break; |
|
| 47 | - case 'SemicolonSpacingUnitTest.js': |
|
| 48 | - return [ |
|
| 49 | - 3 => 1, |
|
| 50 | - 4 => 1, |
|
| 51 | - 6 => 1, |
|
| 52 | - 10 => 2, |
|
| 53 | - 11 => 1, |
|
| 54 | - 13 => 1, |
|
| 55 | - 19 => 1, |
|
| 56 | - 22 => 1, |
|
| 57 | - 25 => 1, |
|
| 58 | - ]; |
|
| 59 | - break; |
|
| 60 | - default: |
|
| 61 | - return []; |
|
| 62 | - break; |
|
| 31 | + case 'SemicolonSpacingUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 3 => 1, |
|
| 34 | + 4 => 1, |
|
| 35 | + 5 => 2, |
|
| 36 | + 6 => 1, |
|
| 37 | + 8 => 1, |
|
| 38 | + 9 => 1, |
|
| 39 | + 14 => 1, |
|
| 40 | + 16 => 1, |
|
| 41 | + 18 => 1, |
|
| 42 | + 29 => 1, |
|
| 43 | + 30 => 2, |
|
| 44 | + 36 => 1, |
|
| 45 | + ]; |
|
| 46 | + break; |
|
| 47 | + case 'SemicolonSpacingUnitTest.js': |
|
| 48 | + return [ |
|
| 49 | + 3 => 1, |
|
| 50 | + 4 => 1, |
|
| 51 | + 6 => 1, |
|
| 52 | + 10 => 2, |
|
| 53 | + 11 => 1, |
|
| 54 | + 13 => 1, |
|
| 55 | + 19 => 1, |
|
| 56 | + 22 => 1, |
|
| 57 | + 25 => 1, |
|
| 58 | + ]; |
|
| 59 | + break; |
|
| 60 | + default: |
|
| 61 | + return []; |
|
| 62 | + break; |
|
| 63 | 63 | }//end switch |
| 64 | 64 | |
| 65 | 65 | }//end getErrorList() |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return array<int, int> |
| 27 | 27 | */ |
| 28 | - public function getErrorList($testFile='ControlStructureSpacingUnitTest.inc') |
|
| 28 | + public function getErrorList($testFile = 'ControlStructureSpacingUnitTest.inc') |
|
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | 31 | case 'ControlStructureSpacingUnitTest.inc': |
@@ -15,89 +15,89 @@ |
||
| 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='ControlStructureSpacingUnitTest.inc') |
|
| 29 | - { |
|
| 30 | - switch ($testFile) { |
|
| 31 | - case 'ControlStructureSpacingUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 3 => 1, |
|
| 34 | - 5 => 1, |
|
| 35 | - 8 => 1, |
|
| 36 | - 15 => 1, |
|
| 37 | - 23 => 1, |
|
| 38 | - 74 => 1, |
|
| 39 | - 79 => 1, |
|
| 40 | - 82 => 1, |
|
| 41 | - 83 => 1, |
|
| 42 | - 87 => 1, |
|
| 43 | - 103 => 1, |
|
| 44 | - 113 => 2, |
|
| 45 | - 114 => 2, |
|
| 46 | - 118 => 1, |
|
| 47 | - 150 => 1, |
|
| 48 | - 153 => 1, |
|
| 49 | - 154 => 1, |
|
| 50 | - 157 => 1, |
|
| 51 | - 170 => 1, |
|
| 52 | - 176 => 2, |
|
| 53 | - 179 => 1, |
|
| 54 | - 189 => 1, |
|
| 55 | - 225 => 1, |
|
| 56 | - 237 => 1, |
|
| 57 | - 242 => 1, |
|
| 58 | - 246 => 1, |
|
| 59 | - 248 => 1, |
|
| 60 | - 257 => 3, |
|
| 61 | - 261 => 1, |
|
| 62 | - 262 => 1, |
|
| 63 | - ]; |
|
| 64 | - break; |
|
| 65 | - case 'ControlStructureSpacingUnitTest.js': |
|
| 66 | - return [ |
|
| 67 | - 3 => 1, |
|
| 68 | - 9 => 1, |
|
| 69 | - 15 => 1, |
|
| 70 | - 21 => 1, |
|
| 71 | - 56 => 1, |
|
| 72 | - 61 => 1, |
|
| 73 | - 64 => 1, |
|
| 74 | - 65 => 1, |
|
| 75 | - 68 => 1, |
|
| 76 | - 74 => 2, |
|
| 77 | - 75 => 2, |
|
| 78 | - ]; |
|
| 79 | - break; |
|
| 80 | - default: |
|
| 81 | - return []; |
|
| 82 | - break; |
|
| 83 | - }//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='ControlStructureSpacingUnitTest.inc') |
|
| 29 | + { |
|
| 30 | + switch ($testFile) { |
|
| 31 | + case 'ControlStructureSpacingUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 3 => 1, |
|
| 34 | + 5 => 1, |
|
| 35 | + 8 => 1, |
|
| 36 | + 15 => 1, |
|
| 37 | + 23 => 1, |
|
| 38 | + 74 => 1, |
|
| 39 | + 79 => 1, |
|
| 40 | + 82 => 1, |
|
| 41 | + 83 => 1, |
|
| 42 | + 87 => 1, |
|
| 43 | + 103 => 1, |
|
| 44 | + 113 => 2, |
|
| 45 | + 114 => 2, |
|
| 46 | + 118 => 1, |
|
| 47 | + 150 => 1, |
|
| 48 | + 153 => 1, |
|
| 49 | + 154 => 1, |
|
| 50 | + 157 => 1, |
|
| 51 | + 170 => 1, |
|
| 52 | + 176 => 2, |
|
| 53 | + 179 => 1, |
|
| 54 | + 189 => 1, |
|
| 55 | + 225 => 1, |
|
| 56 | + 237 => 1, |
|
| 57 | + 242 => 1, |
|
| 58 | + 246 => 1, |
|
| 59 | + 248 => 1, |
|
| 60 | + 257 => 3, |
|
| 61 | + 261 => 1, |
|
| 62 | + 262 => 1, |
|
| 63 | + ]; |
|
| 64 | + break; |
|
| 65 | + case 'ControlStructureSpacingUnitTest.js': |
|
| 66 | + return [ |
|
| 67 | + 3 => 1, |
|
| 68 | + 9 => 1, |
|
| 69 | + 15 => 1, |
|
| 70 | + 21 => 1, |
|
| 71 | + 56 => 1, |
|
| 72 | + 61 => 1, |
|
| 73 | + 64 => 1, |
|
| 74 | + 65 => 1, |
|
| 75 | + 68 => 1, |
|
| 76 | + 74 => 2, |
|
| 77 | + 75 => 2, |
|
| 78 | + ]; |
|
| 79 | + break; |
|
| 80 | + default: |
|
| 81 | + return []; |
|
| 82 | + break; |
|
| 83 | + }//end switch |
|
| 84 | 84 | |
| 85 | - }//end getErrorList() |
|
| 85 | + }//end getErrorList() |
|
| 86 | 86 | |
| 87 | 87 | |
| 88 | - /** |
|
| 89 | - * Returns the lines where warnings should occur. |
|
| 90 | - * |
|
| 91 | - * The key of the array should represent the line number and the value |
|
| 92 | - * should represent the number of warnings that should occur on that line. |
|
| 93 | - * |
|
| 94 | - * @return array<int, int> |
|
| 95 | - */ |
|
| 96 | - public function getWarningList() |
|
| 97 | - { |
|
| 98 | - return []; |
|
| 88 | + /** |
|
| 89 | + * Returns the lines where warnings should occur. |
|
| 90 | + * |
|
| 91 | + * The key of the array should represent the line number and the value |
|
| 92 | + * should represent the number of warnings that should occur on that line. |
|
| 93 | + * |
|
| 94 | + * @return array<int, int> |
|
| 95 | + */ |
|
| 96 | + public function getWarningList() |
|
| 97 | + { |
|
| 98 | + return []; |
|
| 99 | 99 | |
| 100 | - }//end getWarningList() |
|
| 100 | + }//end getWarningList() |
|
| 101 | 101 | |
| 102 | 102 | |
| 103 | 103 | }//end class |
@@ -28,58 +28,58 @@ |
||
| 28 | 28 | public function getErrorList($testFile='ControlStructureSpacingUnitTest.inc') |
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | - case 'ControlStructureSpacingUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 3 => 1, |
|
| 34 | - 5 => 1, |
|
| 35 | - 8 => 1, |
|
| 36 | - 15 => 1, |
|
| 37 | - 23 => 1, |
|
| 38 | - 74 => 1, |
|
| 39 | - 79 => 1, |
|
| 40 | - 82 => 1, |
|
| 41 | - 83 => 1, |
|
| 42 | - 87 => 1, |
|
| 43 | - 103 => 1, |
|
| 44 | - 113 => 2, |
|
| 45 | - 114 => 2, |
|
| 46 | - 118 => 1, |
|
| 47 | - 150 => 1, |
|
| 48 | - 153 => 1, |
|
| 49 | - 154 => 1, |
|
| 50 | - 157 => 1, |
|
| 51 | - 170 => 1, |
|
| 52 | - 176 => 2, |
|
| 53 | - 179 => 1, |
|
| 54 | - 189 => 1, |
|
| 55 | - 225 => 1, |
|
| 56 | - 237 => 1, |
|
| 57 | - 242 => 1, |
|
| 58 | - 246 => 1, |
|
| 59 | - 248 => 1, |
|
| 60 | - 257 => 3, |
|
| 61 | - 261 => 1, |
|
| 62 | - 262 => 1, |
|
| 63 | - ]; |
|
| 64 | - break; |
|
| 65 | - case 'ControlStructureSpacingUnitTest.js': |
|
| 66 | - return [ |
|
| 67 | - 3 => 1, |
|
| 68 | - 9 => 1, |
|
| 69 | - 15 => 1, |
|
| 70 | - 21 => 1, |
|
| 71 | - 56 => 1, |
|
| 72 | - 61 => 1, |
|
| 73 | - 64 => 1, |
|
| 74 | - 65 => 1, |
|
| 75 | - 68 => 1, |
|
| 76 | - 74 => 2, |
|
| 77 | - 75 => 2, |
|
| 78 | - ]; |
|
| 79 | - break; |
|
| 80 | - default: |
|
| 81 | - return []; |
|
| 82 | - break; |
|
| 31 | + case 'ControlStructureSpacingUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 3 => 1, |
|
| 34 | + 5 => 1, |
|
| 35 | + 8 => 1, |
|
| 36 | + 15 => 1, |
|
| 37 | + 23 => 1, |
|
| 38 | + 74 => 1, |
|
| 39 | + 79 => 1, |
|
| 40 | + 82 => 1, |
|
| 41 | + 83 => 1, |
|
| 42 | + 87 => 1, |
|
| 43 | + 103 => 1, |
|
| 44 | + 113 => 2, |
|
| 45 | + 114 => 2, |
|
| 46 | + 118 => 1, |
|
| 47 | + 150 => 1, |
|
| 48 | + 153 => 1, |
|
| 49 | + 154 => 1, |
|
| 50 | + 157 => 1, |
|
| 51 | + 170 => 1, |
|
| 52 | + 176 => 2, |
|
| 53 | + 179 => 1, |
|
| 54 | + 189 => 1, |
|
| 55 | + 225 => 1, |
|
| 56 | + 237 => 1, |
|
| 57 | + 242 => 1, |
|
| 58 | + 246 => 1, |
|
| 59 | + 248 => 1, |
|
| 60 | + 257 => 3, |
|
| 61 | + 261 => 1, |
|
| 62 | + 262 => 1, |
|
| 63 | + ]; |
|
| 64 | + break; |
|
| 65 | + case 'ControlStructureSpacingUnitTest.js': |
|
| 66 | + return [ |
|
| 67 | + 3 => 1, |
|
| 68 | + 9 => 1, |
|
| 69 | + 15 => 1, |
|
| 70 | + 21 => 1, |
|
| 71 | + 56 => 1, |
|
| 72 | + 61 => 1, |
|
| 73 | + 64 => 1, |
|
| 74 | + 65 => 1, |
|
| 75 | + 68 => 1, |
|
| 76 | + 74 => 2, |
|
| 77 | + 75 => 2, |
|
| 78 | + ]; |
|
| 79 | + break; |
|
| 80 | + default: |
|
| 81 | + return []; |
|
| 82 | + break; |
|
| 83 | 83 | }//end switch |
| 84 | 84 | |
| 85 | 85 | }//end getErrorList() |
@@ -1,26 +1,26 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | function MyFunction1() { |
| 4 | - // Some code goes here. |
|
| 4 | + // Some code goes here. |
|
| 5 | 5 | |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | function MyFunction2() { |
| 9 | - // Some code goes here. |
|
| 9 | + // Some code goes here. |
|
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | class MyClass |
| 13 | 13 | { |
| 14 | - function MyFunction3() { |
|
| 15 | - // Some code goes here. |
|
| 14 | + function MyFunction3() { |
|
| 15 | + // Some code goes here. |
|
| 16 | 16 | |
| 17 | - } |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - function MyFunction4() { |
|
| 20 | - // Some code goes here. |
|
| 21 | - } |
|
| 19 | + function MyFunction4() { |
|
| 20 | + // Some code goes here. |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - public function register(); |
|
| 23 | + public function register(); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function register(); |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | function foo() |
| 34 | 34 | { |
| 35 | - for ($i = 0; $i < $bar; $i++) { |
|
| 36 | - }//end for |
|
| 35 | + for ($i = 0; $i < $bar; $i++) { |
|
| 36 | + }//end for |
|
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | } |
@@ -15,62 +15,62 @@ |
||
| 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='FunctionClosingBraceSpaceUnitTest.inc') |
|
| 29 | - { |
|
| 30 | - switch ($testFile) { |
|
| 31 | - case 'FunctionClosingBraceSpaceUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 10 => 1, |
|
| 34 | - 21 => 1, |
|
| 35 | - 28 => 1, |
|
| 36 | - 29 => 1, |
|
| 37 | - 31 => 1, |
|
| 38 | - 39 => 1, |
|
| 39 | - ]; |
|
| 40 | - break; |
|
| 41 | - case 'FunctionClosingBraceSpaceUnitTest.js': |
|
| 42 | - return [ |
|
| 43 | - 13 => 1, |
|
| 44 | - 25 => 1, |
|
| 45 | - 32 => 1, |
|
| 46 | - 53 => 1, |
|
| 47 | - 59 => 1, |
|
| 48 | - 67 => 1, |
|
| 49 | - 84 => 1, |
|
| 50 | - 128 => 1, |
|
| 51 | - ]; |
|
| 52 | - break; |
|
| 53 | - default: |
|
| 54 | - return []; |
|
| 55 | - break; |
|
| 56 | - }//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='FunctionClosingBraceSpaceUnitTest.inc') |
|
| 29 | + { |
|
| 30 | + switch ($testFile) { |
|
| 31 | + case 'FunctionClosingBraceSpaceUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 10 => 1, |
|
| 34 | + 21 => 1, |
|
| 35 | + 28 => 1, |
|
| 36 | + 29 => 1, |
|
| 37 | + 31 => 1, |
|
| 38 | + 39 => 1, |
|
| 39 | + ]; |
|
| 40 | + break; |
|
| 41 | + case 'FunctionClosingBraceSpaceUnitTest.js': |
|
| 42 | + return [ |
|
| 43 | + 13 => 1, |
|
| 44 | + 25 => 1, |
|
| 45 | + 32 => 1, |
|
| 46 | + 53 => 1, |
|
| 47 | + 59 => 1, |
|
| 48 | + 67 => 1, |
|
| 49 | + 84 => 1, |
|
| 50 | + 128 => 1, |
|
| 51 | + ]; |
|
| 52 | + break; |
|
| 53 | + default: |
|
| 54 | + return []; |
|
| 55 | + break; |
|
| 56 | + }//end switch |
|
| 57 | 57 | |
| 58 | - }//end getErrorList() |
|
| 58 | + }//end getErrorList() |
|
| 59 | 59 | |
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * Returns the lines where warnings should occur. |
|
| 63 | - * |
|
| 64 | - * The key of the array should represent the line number and the value |
|
| 65 | - * should represent the number of warnings that should occur on that line. |
|
| 66 | - * |
|
| 67 | - * @return array<int, int> |
|
| 68 | - */ |
|
| 69 | - public function getWarningList() |
|
| 70 | - { |
|
| 71 | - return []; |
|
| 61 | + /** |
|
| 62 | + * Returns the lines where warnings should occur. |
|
| 63 | + * |
|
| 64 | + * The key of the array should represent the line number and the value |
|
| 65 | + * should represent the number of warnings that should occur on that line. |
|
| 66 | + * |
|
| 67 | + * @return array<int, int> |
|
| 68 | + */ |
|
| 69 | + public function getWarningList() |
|
| 70 | + { |
|
| 71 | + return []; |
|
| 72 | 72 | |
| 73 | - }//end getWarningList() |
|
| 73 | + }//end getWarningList() |
|
| 74 | 74 | |
| 75 | 75 | |
| 76 | 76 | }//end class |
@@ -28,31 +28,31 @@ |
||
| 28 | 28 | public function getErrorList($testFile='FunctionClosingBraceSpaceUnitTest.inc') |
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | - case 'FunctionClosingBraceSpaceUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 10 => 1, |
|
| 34 | - 21 => 1, |
|
| 35 | - 28 => 1, |
|
| 36 | - 29 => 1, |
|
| 37 | - 31 => 1, |
|
| 38 | - 39 => 1, |
|
| 39 | - ]; |
|
| 40 | - break; |
|
| 41 | - case 'FunctionClosingBraceSpaceUnitTest.js': |
|
| 42 | - return [ |
|
| 43 | - 13 => 1, |
|
| 44 | - 25 => 1, |
|
| 45 | - 32 => 1, |
|
| 46 | - 53 => 1, |
|
| 47 | - 59 => 1, |
|
| 48 | - 67 => 1, |
|
| 49 | - 84 => 1, |
|
| 50 | - 128 => 1, |
|
| 51 | - ]; |
|
| 52 | - break; |
|
| 53 | - default: |
|
| 54 | - return []; |
|
| 55 | - break; |
|
| 31 | + case 'FunctionClosingBraceSpaceUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 10 => 1, |
|
| 34 | + 21 => 1, |
|
| 35 | + 28 => 1, |
|
| 36 | + 29 => 1, |
|
| 37 | + 31 => 1, |
|
| 38 | + 39 => 1, |
|
| 39 | + ]; |
|
| 40 | + break; |
|
| 41 | + case 'FunctionClosingBraceSpaceUnitTest.js': |
|
| 42 | + return [ |
|
| 43 | + 13 => 1, |
|
| 44 | + 25 => 1, |
|
| 45 | + 32 => 1, |
|
| 46 | + 53 => 1, |
|
| 47 | + 59 => 1, |
|
| 48 | + 67 => 1, |
|
| 49 | + 84 => 1, |
|
| 50 | + 128 => 1, |
|
| 51 | + ]; |
|
| 52 | + break; |
|
| 53 | + default: |
|
| 54 | + return []; |
|
| 55 | + break; |
|
| 56 | 56 | }//end switch |
| 57 | 57 | |
| 58 | 58 | }//end getErrorList() |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return array<int, int> |
| 27 | 27 | */ |
| 28 | - public function getErrorList($testFile='FunctionClosingBraceSpaceUnitTest.inc') |
|
| 28 | + public function getErrorList($testFile = 'FunctionClosingBraceSpaceUnitTest.inc') |
|
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | 31 | case 'FunctionClosingBraceSpaceUnitTest.inc': |
@@ -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 | - 2 => 1, |
|
| 30 | - 4 => 1, |
|
| 31 | - 9 => 2, |
|
| 32 | - 10 => 1, |
|
| 33 | - 12 => 1, |
|
| 34 | - 18 => 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 | + 2 => 1, |
|
| 30 | + 4 => 1, |
|
| 31 | + 9 => 2, |
|
| 32 | + 10 => 1, |
|
| 33 | + 12 => 1, |
|
| 34 | + 18 => 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 |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | $chr = $str{0}; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - if (!class_exists($class_name)) { |
|
| 33 | + if ( ! class_exists($class_name)) { |
|
| 34 | 34 | echo $error; |
| 35 | 35 | } |
| 36 | - $this->{$property} =& new $class_name($this->db_index); |
|
| 37 | - $this->modules[$module] =& $this->{$property}; |
|
| 36 | + $this->{$property} = & new $class_name($this->db_index); |
|
| 37 | + $this->modules[$module] = & $this->{$property}; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | foreach ($elements as $element) { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | ?> |
| 64 | 64 | |
| 65 | -<?php while($row = $data->getRow()): ?> |
|
| 65 | +<?php while ($row = $data->getRow()): ?> |
|
| 66 | 66 | <p><?= $val ?></p> |
| 67 | 67 | <?php endwhile; ?> |
| 68 | 68 | |
@@ -93,15 +93,15 @@ discard block |
||
| 93 | 93 | public function foo() |
| 94 | 94 | { |
| 95 | 95 | $foo('some |
| 96 | - long description', function () { |
|
| 96 | + long description', function() { |
|
| 97 | 97 | }); |
| 98 | 98 | |
| 99 | 99 | $foo('some |
| 100 | 100 | long |
| 101 | - description', function () { |
|
| 101 | + description', function() { |
|
| 102 | 102 | }); |
| 103 | 103 | |
| 104 | 104 | $foo( |
| 105 | -'bad indent here leads to bad indent for closer', function () { |
|
| 105 | +'bad indent here leads to bad indent for closer', function() { |
|
| 106 | 106 | }); |
| 107 | 107 | } |
@@ -2,19 +2,19 @@ discard block |
||
| 2 | 2 | use some\foo\{ClassA, ClassB, ClassC as C}; |
| 3 | 3 | class Test |
| 4 | 4 | { |
| 5 | - public function __construct() |
|
| 6 | - { |
|
| 7 | - } |
|
| 5 | + public function __construct() |
|
| 6 | + { |
|
| 7 | + } |
|
| 8 | 8 | |
| 9 | - function test1() |
|
| 10 | - { |
|
| 11 | - } |
|
| 9 | + function test1() |
|
| 10 | + { |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - function test2() {} |
|
| 13 | + function test2() {} |
|
| 14 | 14 | |
| 15 | - private function _test3() |
|
| 16 | - { |
|
| 17 | - } |
|
| 15 | + private function _test3() |
|
| 16 | + { |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | 19 | } |
| 20 | 20 | |
@@ -26,38 +26,38 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | public function test2() |
| 28 | 28 | { |
| 29 | - if ($str{0}) { |
|
| 30 | - $chr = $str{0}; |
|
| 31 | - } |
|
| 29 | + if ($str{0}) { |
|
| 30 | + $chr = $str{0}; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - if (!class_exists($class_name)) { |
|
| 34 | - echo $error; |
|
| 35 | - } |
|
| 36 | - $this->{$property} =& new $class_name($this->db_index); |
|
| 37 | - $this->modules[$module] =& $this->{$property}; |
|
| 33 | + if (!class_exists($class_name)) { |
|
| 34 | + echo $error; |
|
| 35 | + } |
|
| 36 | + $this->{$property} =& new $class_name($this->db_index); |
|
| 37 | + $this->modules[$module] =& $this->{$property}; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | foreach ($elements as $element) { |
| 41 | - if ($something) { |
|
| 42 | - // Do IF. |
|
| 43 | - } else if ($somethingElse) { |
|
| 44 | - // Do ELSE. |
|
| 45 | - } |
|
| 41 | + if ($something) { |
|
| 42 | + // Do IF. |
|
| 43 | + } else if ($somethingElse) { |
|
| 44 | + // Do ELSE. |
|
| 45 | + } |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | if ($token['code'] === T_COMMENT |
| 49 | - && $multiLineComment === false |
|
| 50 | - && (substr($token['content'], 0, 2) === '//' |
|
| 51 | - || $token['content']{0} === '#') |
|
| 49 | + && $multiLineComment === false |
|
| 50 | + && (substr($token['content'], 0, 2) === '//' |
|
| 51 | + || $token['content']{0} === '#') |
|
| 52 | 52 | ) { |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | switch ($blah) { |
| 56 | - case 'one': |
|
| 57 | - echo 'one'; |
|
| 58 | - break; |
|
| 59 | - default: |
|
| 60 | - echo 'another'; |
|
| 56 | + case 'one': |
|
| 57 | + echo 'one'; |
|
| 58 | + break; |
|
| 59 | + default: |
|
| 60 | + echo 'another'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | ?> |
@@ -75,33 +75,33 @@ discard block |
||
| 75 | 75 | </body> |
| 76 | 76 | |
| 77 | 77 | <?php |
| 78 | - if ($foo) { |
|
| 79 | - ?> |
|
| 78 | + if ($foo) { |
|
| 79 | + ?> |
|
| 80 | 80 | <?php } ?> |
| 81 | 81 | |
| 82 | 82 | <?php |
| 83 | - if ($foo) { |
|
| 84 | - ?> |
|
| 83 | + if ($foo) { |
|
| 84 | + ?> |
|
| 85 | 85 | <?php } ?> |
| 86 | 86 | |
| 87 | 87 | <?php |
| 88 | - if ($foo) { |
|
| 89 | - ?> |
|
| 88 | + if ($foo) { |
|
| 89 | + ?> |
|
| 90 | 90 | <?php } ?> |
| 91 | 91 | |
| 92 | 92 | <?php |
| 93 | 93 | public function foo() |
| 94 | 94 | { |
| 95 | - $foo('some |
|
| 95 | + $foo('some |
|
| 96 | 96 | long description', function () { |
| 97 | - }); |
|
| 97 | + }); |
|
| 98 | 98 | |
| 99 | - $foo('some |
|
| 99 | + $foo('some |
|
| 100 | 100 | long |
| 101 | 101 | description', function () { |
| 102 | 102 | }); |
| 103 | 103 | |
| 104 | - $foo( |
|
| 104 | + $foo( |
|
| 105 | 105 | 'bad indent here leads to bad indent for closer', function () { |
| 106 | 106 | }); |
| 107 | 107 | } |
@@ -111,9 +111,9 @@ discard block |
||
| 111 | 111 | $match = match ($test) { 1 => 'a', 2 => 'b' }; |
| 112 | 112 | |
| 113 | 113 | $match = match ($test) { |
| 114 | - 1 => 'a', |
|
| 115 | - 2 => 'b' |
|
| 116 | - }; |
|
| 114 | + 1 => 'a', |
|
| 115 | + 2 => 'b' |
|
| 116 | + }; |
|
| 117 | 117 | |
| 118 | 118 | ?> |
| 119 | 119 | <?php if ($someConditional) : ?> |
@@ -131,4 +131,4 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | enum Cards |
| 133 | 133 | { |
| 134 | - } |
|
| 134 | + } |
|
@@ -57,16 +57,16 @@ |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | switch ($blah) { |
| 60 | - case 'one': |
|
| 61 | - if ($blah) { |
|
| 62 | - // There are no spaces before break. |
|
| 63 | - } |
|
| 64 | - break; |
|
| 65 | - |
|
| 66 | - default: |
|
| 67 | - if ($blah) { |
|
| 68 | - // Code here. |
|
| 69 | - } |
|
| 60 | + case 'one': |
|
| 61 | + if ($blah) { |
|
| 62 | + // There are no spaces before break. |
|
| 63 | + } |
|
| 64 | + break; |
|
| 65 | + |
|
| 66 | + default: |
|
| 67 | + if ($blah) { |
|
| 68 | + // Code here. |
|
| 69 | + } |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | foreach ($blah as $var) { |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | if ($one) { |
| 20 | -} else ($two) { |
|
| 20 | +} else { |
|
| 21 | + ($two) { |
|
| 21 | 22 | } else if ($three) { |
| 22 | 23 | } elseif ($four) { |
| 23 | 24 | } |
@@ -48,6 +49,7 @@ discard block |
||
| 48 | 49 | // There are no spaces before break. |
| 49 | 50 | } |
| 50 | 51 | break; |
| 52 | +} |
|
| 51 | 53 | |
| 52 | 54 | default: |
| 53 | 55 | if ($blah) { |
@@ -158,8 +160,7 @@ discard block |
||
| 158 | 160 | } |
| 159 | 161 | |
| 160 | 162 | if ($one) { |
| 161 | -} |
|
| 162 | -elseif ($two) { |
|
| 163 | +} elseif ($two) { |
|
| 163 | 164 | } |
| 164 | 165 | // else if something |
| 165 | 166 | else if ($three) { |
@@ -193,11 +194,9 @@ discard block |
||
| 193 | 194 | |
| 194 | 195 | try { |
| 195 | 196 | // Something |
| 196 | -} |
|
| 197 | -catch (Exception $e) { |
|
| 197 | +} catch (Exception $e) { |
|
| 198 | 198 | // Something |
| 199 | -} |
|
| 200 | -finally { |
|
| 199 | +} finally { |
|
| 201 | 200 | // Something |
| 202 | 201 | } |
| 203 | 202 | |
@@ -4,16 +4,16 @@ discard block |
||
| 4 | 4 | foreach ($this as $that) { |
| 5 | 5 | } |
| 6 | 6 | while (true) { |
| 7 | - for ($i = 0; $i < 10; $i++) { |
|
| 8 | - } |
|
| 9 | - if ($something) { |
|
| 10 | - } |
|
| 7 | + for ($i = 0; $i < 10; $i++) { |
|
| 8 | + } |
|
| 9 | + if ($something) { |
|
| 10 | + } |
|
| 11 | 11 | |
| 12 | - foreach ($this as $that) { |
|
| 13 | - do { |
|
| 14 | - } while (true); |
|
| 12 | + foreach ($this as $that) { |
|
| 13 | + do { |
|
| 14 | + } while (true); |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | if ($one) { |
@@ -31,110 +31,110 @@ discard block |
||
| 31 | 31 | <tr> |
| 32 | 32 | <td align="center" valign="center"> |
| 33 | 33 | <?php |
| 34 | - foreach ($this->children as $child) { |
|
| 35 | - // There should be no error after this |
|
| 36 | - // foreach, because it is followed by a |
|
| 37 | - // close PHP tag. |
|
| 38 | - } |
|
| 39 | - ?> |
|
| 34 | + foreach ($this->children as $child) { |
|
| 35 | + // There should be no error after this |
|
| 36 | + // foreach, because it is followed by a |
|
| 37 | + // close PHP tag. |
|
| 38 | + } |
|
| 39 | + ?> |
|
| 40 | 40 | </td> |
| 41 | 41 | </tr> |
| 42 | 42 | </table> |
| 43 | 43 | <?php |
| 44 | 44 | |
| 45 | 45 | switch ($blah) { |
| 46 | - case 'one': |
|
| 47 | - if ($blah) { |
|
| 48 | - // There are no spaces before break. |
|
| 49 | - } |
|
| 50 | - break; |
|
| 51 | - |
|
| 52 | - default: |
|
| 53 | - if ($blah) { |
|
| 54 | - // There are no spaces before break. |
|
| 55 | - } |
|
| 56 | - break; |
|
| 46 | + case 'one': |
|
| 47 | + if ($blah) { |
|
| 48 | + // There are no spaces before break. |
|
| 49 | + } |
|
| 50 | + break; |
|
| 51 | + |
|
| 52 | + default: |
|
| 53 | + if ($blah) { |
|
| 54 | + // There are no spaces before break. |
|
| 55 | + } |
|
| 56 | + break; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | switch ($blah) { |
| 60 | - case 'one': |
|
| 61 | - if ($blah) { |
|
| 62 | - // There are no spaces before break. |
|
| 63 | - } |
|
| 64 | - break; |
|
| 65 | - |
|
| 66 | - default: |
|
| 67 | - if ($blah) { |
|
| 68 | - // Code here. |
|
| 69 | - } |
|
| 60 | + case 'one': |
|
| 61 | + if ($blah) { |
|
| 62 | + // There are no spaces before break. |
|
| 63 | + } |
|
| 64 | + break; |
|
| 65 | + |
|
| 66 | + default: |
|
| 67 | + if ($blah) { |
|
| 68 | + // Code here. |
|
| 69 | + } |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | foreach ($blah as $var) { |
| 73 | - if ($blah) { |
|
| 74 | - } |
|
| 75 | - break; |
|
| 73 | + if ($blah) { |
|
| 74 | + } |
|
| 75 | + break; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | while (true) { |
| 79 | - for ($i = 0; $i < 10; $i++) { |
|
| 79 | + for ($i = 0; $i < 10; $i++) { |
|
| 80 | 80 | |
| 81 | - if ($something) { |
|
| 82 | - } |
|
| 81 | + if ($something) { |
|
| 82 | + } |
|
| 83 | 83 | |
| 84 | - } |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | - foreach ($this as $that) { |
|
| 87 | - do { |
|
| 86 | + foreach ($this as $that) { |
|
| 87 | + do { |
|
| 88 | 88 | |
| 89 | - echo $i; |
|
| 90 | - } while (true); |
|
| 91 | - } |
|
| 89 | + echo $i; |
|
| 90 | + } while (true); |
|
| 91 | + } |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | function myFunction() |
| 95 | 95 | { |
| 96 | - if ($blah) { |
|
| 97 | - } |
|
| 96 | + if ($blah) { |
|
| 97 | + } |
|
| 98 | 98 | |
| 99 | 99 | }//end myFunction() |
| 100 | 100 | |
| 101 | 101 | foreach ($this->children as $child) { |
| 102 | - echo $child; |
|
| 102 | + echo $child; |
|
| 103 | 103 | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | if ($defaultPageDesign === 0 |
| 107 | - && $defaultCascade === TRUE |
|
| 108 | - && $defaultChildDesign === 0 |
|
| 107 | + && $defaultCascade === TRUE |
|
| 108 | + && $defaultChildDesign === 0 |
|
| 109 | 109 | ) { |
| 110 | - $settingsUpdated = FALSE; |
|
| 110 | + $settingsUpdated = FALSE; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | foreach ( $blah as $var ) { |
| 114 | - if ( $blah ) { |
|
| 115 | - } |
|
| 114 | + if ( $blah ) { |
|
| 115 | + } |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | if ( |
| 119 | - $defaultPageDesign === 0 |
|
| 120 | - && $defaultCascade === TRUE |
|
| 121 | - && $defaultChildDesign === 0 |
|
| 119 | + $defaultPageDesign === 0 |
|
| 120 | + && $defaultCascade === TRUE |
|
| 121 | + && $defaultChildDesign === 0 |
|
| 122 | 122 | ) { |
| 123 | - $settingsUpdated = FALSE; |
|
| 123 | + $settingsUpdated = FALSE; |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | $moo = 'blar'; |
| 127 | 127 | switch ($moo) |
| 128 | 128 | { |
| 129 | - case 'blar': |
|
| 130 | - if ($moo === 'blar2') { |
|
| 131 | - $moo = 'blar' |
|
| 132 | - } |
|
| 133 | - return $moo; |
|
| 134 | - |
|
| 135 | - default: |
|
| 136 | - $moo = 'moo'; |
|
| 137 | - break; |
|
| 129 | + case 'blar': |
|
| 130 | + if ($moo === 'blar2') { |
|
| 131 | + $moo = 'blar' |
|
| 132 | + } |
|
| 133 | + return $moo; |
|
| 134 | + |
|
| 135 | + default: |
|
| 136 | + $moo = 'moo'; |
|
| 137 | + break; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | do { |
@@ -142,18 +142,18 @@ discard block |
||
| 142 | 142 | while (true); |
| 143 | 143 | |
| 144 | 144 | try { |
| 145 | - // Something |
|
| 145 | + // Something |
|
| 146 | 146 | } catch (Exception $e) { |
| 147 | - // Something |
|
| 147 | + // Something |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | try { |
| 151 | 151 | |
| 152 | - // Something |
|
| 152 | + // Something |
|
| 153 | 153 | |
| 154 | 154 | } catch (Exception $e) { |
| 155 | 155 | |
| 156 | - // Something |
|
| 156 | + // Something |
|
| 157 | 157 | |
| 158 | 158 | } |
| 159 | 159 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | do { |
| 175 | - echo 'hi'; |
|
| 175 | + echo 'hi'; |
|
| 176 | 176 | } while ( $blah ); |
| 177 | 177 | |
| 178 | 178 | if ($one) { |
@@ -183,62 +183,62 @@ discard block |
||
| 183 | 183 | |
| 184 | 184 | switch ($moo) |
| 185 | 185 | { |
| 186 | - case 'blar': |
|
| 187 | - if ($moo === 'blar2') { |
|
| 188 | - $moo = 'blar' |
|
| 189 | - } |
|
| 186 | + case 'blar': |
|
| 187 | + if ($moo === 'blar2') { |
|
| 188 | + $moo = 'blar' |
|
| 189 | + } |
|
| 190 | 190 | |
| 191 | - return $moo; |
|
| 191 | + return $moo; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | try { |
| 195 | - // Something |
|
| 195 | + // Something |
|
| 196 | 196 | } |
| 197 | 197 | catch (Exception $e) { |
| 198 | - // Something |
|
| 198 | + // Something |
|
| 199 | 199 | } |
| 200 | 200 | finally { |
| 201 | - // Something |
|
| 201 | + // Something |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | if ($foo) { |
| 205 | 205 | |
| 206 | 206 | |
| 207 | - /** |
|
| 208 | - * Comment |
|
| 209 | - */ |
|
| 210 | - function foo() { |
|
| 211 | - // Code here |
|
| 212 | - } |
|
| 207 | + /** |
|
| 208 | + * Comment |
|
| 209 | + */ |
|
| 210 | + function foo() { |
|
| 211 | + // Code here |
|
| 212 | + } |
|
| 213 | 213 | |
| 214 | 214 | |
| 215 | - /** |
|
| 216 | - * Comment |
|
| 217 | - */ |
|
| 218 | - class bar() { |
|
| 215 | + /** |
|
| 216 | + * Comment |
|
| 217 | + */ |
|
| 218 | + class bar() { |
|
| 219 | 219 | |
| 220 | - }//end class |
|
| 220 | + }//end class |
|
| 221 | 221 | |
| 222 | 222 | |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | if (true) { // some comment goes here |
| 226 | 226 | |
| 227 | - echo 'foo'; |
|
| 227 | + echo 'foo'; |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | if (true) { echo 'foo'; |
| 231 | 231 | |
| 232 | - echo 'foo'; |
|
| 232 | + echo 'foo'; |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | if ($true) { |
| 236 | - echo 'hi 2'; |
|
| 236 | + echo 'hi 2'; |
|
| 237 | 237 | }//end if |
| 238 | 238 | echo 'hi'; |
| 239 | 239 | |
| 240 | 240 | if ($true) { |
| 241 | - echo 'hi 2'; |
|
| 241 | + echo 'hi 2'; |
|
| 242 | 242 | } // phpcs:enable Standard.Category.Sniff -- for reasons. |
| 243 | 243 | echo 'hi'; |
| 244 | 244 | |
@@ -247,8 +247,8 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | <?php foreach($fieldset['Field'] as $field): |
| 249 | 249 | |
| 250 | - echo 'foo'; |
|
| 251 | - ?> |
|
| 250 | + echo 'foo'; |
|
| 251 | + ?> |
|
| 252 | 252 | <?php endforeach; ?> |
| 253 | 253 | <?php endforeach; ?> |
| 254 | 254 | |
@@ -256,14 +256,14 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | $expr = match( $foo ){ |
| 258 | 258 | |
| 259 | - 1 => 1, |
|
| 260 | - 2 => 2, |
|
| 259 | + 1 => 1, |
|
| 260 | + 2 => 2, |
|
| 261 | 261 | |
| 262 | 262 | }; |
| 263 | 263 | echo $expr; |
| 264 | 264 | |
| 265 | 265 | if($true) { |
| 266 | 266 | |
| 267 | - enum SomeEnum {} |
|
| 267 | + enum SomeEnum {} |
|
| 268 | 268 | |
| 269 | 269 | } |
@@ -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 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | do { |
| 88 | 88 | |
| 89 | 89 | echo $i; |
| 90 | - } while (true); |
|
| 90 | + }while (true); |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
@@ -110,8 +110,8 @@ discard block |
||
| 110 | 110 | $settingsUpdated = FALSE; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | -foreach ( $blah as $var ) { |
|
| 114 | - if ( $blah ) { |
|
| 113 | +foreach ($blah as $var) { |
|
| 114 | + if ($blah) { |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | do { |
| 175 | 175 | echo 'hi'; |
| 176 | -} while ( $blah ); |
|
| 176 | +}while ($blah); |
|
| 177 | 177 | |
| 178 | 178 | if ($one) { |
| 179 | 179 | } |
@@ -243,9 +243,9 @@ discard block |
||
| 243 | 243 | echo 'hi'; |
| 244 | 244 | |
| 245 | 245 | ?> |
| 246 | -<?php foreach($formset['Fieldset'] as $fieldset): ?> |
|
| 246 | +<?php foreach ($formset['Fieldset'] as $fieldset): ?> |
|
| 247 | 247 | |
| 248 | - <?php foreach($fieldset['Field'] as $field): |
|
| 248 | + <?php foreach ($fieldset['Field'] as $field): |
|
| 249 | 249 | |
| 250 | 250 | echo 'foo'; |
| 251 | 251 | ?> |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | <?php |
| 256 | 256 | |
| 257 | -$expr = match( $foo ){ |
|
| 257 | +$expr = match($foo){ |
|
| 258 | 258 | |
| 259 | 259 | 1 => 1, |
| 260 | 260 | 2 => 2, |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | }; |
| 263 | 263 | echo $expr; |
| 264 | 264 | |
| 265 | -if($true) { |
|
| 265 | +if ($true) { |
|
| 266 | 266 | |
| 267 | 267 | enum SomeEnum {} |
| 268 | 268 | |