Completed
Branch master (d87ed9)
by Tomáš
07:16
created
Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 10 => 1,
52 52
                 52 => 1,
53 53
                 53 => 1,
54
-               );
54
+                );
55 55
 
56 56
     }//end getErrorList()
57 57
 
Please login to merge, or discard this patch.
Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.inc 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 $var = myFunction(
15 15
         'one',
16 16
         'two'
17
-       );
17
+        );
18 18
 
19 19
 for ($i = ($stackPtr + 1); $i < $endStatement; $i++) {
20 20
 }
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
 $var = myFunction(!$var);
24 24
 
25 25
 $depthAdv = array(
26
-             $this,
27
-             !$directLinks,
28
-             FALSE,
26
+                $this,
27
+                !$directLinks,
28
+                FALSE,
29 29
             );
30 30
 
31 31
 $var = myFunction(
32 32
     $var,
33 33
     array(
34
-     $this,
35
-     !$directLinks,
36
-     FALSE,
34
+        $this,
35
+        !$directLinks,
36
+        FALSE,
37 37
     );
38 38
 );
39 39
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/PHP/DisallowObEndFlushUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         return array(
46 46
                 9 => 1,
47
-               );
47
+                );
48 48
 
49 49
     }//end getErrorList()
50 50
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.inc 3 patches
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
 }
50 50
 
51 51
 switch ($lowerVarType) {
52
-    case 'bool':
53
-        return 'boolean';
54
-        echo 'hi';
55
-    case 'double':
56
-    case 'real':
57
-        return 'float';
58
-        echo 'hi';
52
+        case 'bool':
53
+            return 'boolean';
54
+            echo 'hi';
55
+        case 'double':
56
+        case 'real':
57
+            return 'float';
58
+            echo 'hi';
59 59
 }
60 60
 
61 61
 while ($line=fgets($fp,2*1024*1024))
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
 }
67 67
 
68 68
 switch ($var) {
69
-    case 1:
70
-        echo '1';
71
-    break;
69
+        case 1:
70
+            echo '1';
71
+        break;
72 72
 
73
-        echo 'non-executable';
74
-    default:
75
-        echo '2';
76
-    break;
73
+            echo 'non-executable';
74
+        default:
75
+            echo '2';
76
+        break;
77 77
 }
78 78
 
79 79
 switch (0) {
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
 }//end myFunction()
125 125
 
126 126
 switch ($var) {
127
-    case 1: {
128
-        return '1';
129
-    }
127
+        case 1: {
128
+            return '1';
129
+        }
130 130
 
131
-    case 2: {
132
-        return '2';
133
-    }
131
+        case 2: {
132
+            return '2';
133
+        }
134 134
 }
135 135
 
136 136
 defined('FOO') or die('error');
@@ -202,12 +202,12 @@  discard block
 block discarded – undo
202 202
 }
203 203
 
204 204
 switch ($foo) {
205
-    case 'foo':
206
-        if ($foo)
207
-            return $foo;
208
-        return $bar;
209
-    default:
210
-        return $bar;
205
+        case 'foo':
206
+            if ($foo)
207
+                return $foo;
208
+            return $bar;
209
+        default:
210
+            return $bar;
211 211
 }
212 212
 
213 213
 function foo()
@@ -216,13 +216,13 @@  discard block
 block discarded – undo
216 216
 }
217 217
 
218 218
 switch (true) {
219
-    case 1:
220
-        return foo(
221
-            function () {
222
-                $foo = $bar;  // when this is removed it works ok
223
-                return false; // from here on it reports unreachable
224
-            }
225
-        );
219
+        case 1:
220
+            return foo(
221
+                function () {
222
+                    $foo = $bar;  // when this is removed it works ok
223
+                    return false; // from here on it reports unreachable
224
+                }
225
+            );
226 226
 }
227 227
 
228 228
 exit();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
         echo 'hi';
59 59
 }
60 60
 
61
-while ($line=fgets($fp,2*1024*1024))
61
+while ($line = fgets($fp, 2 * 1024 * 1024))
62 62
 {
63
-    if (!preg_match("/^<([a-z0-9_]+)/",$line,$matches))
63
+    if (!preg_match("/^<([a-z0-9_]+)/", $line, $matches))
64 64
     continue;
65 65
     print $line;
66 66
 }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 }//end myFunction()
110 110
 
111 111
 public static function thisCausesAnError() {
112
-return new foo(function() {return $foo;}
112
+return new foo(function() {return $foo; }
113 113
 );
114 114
 }
115 115
 
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
     echo $foo;
181 181
 }
182 182
 
183
-function test(){
184
-    switch($a) {
183
+function test() {
184
+    switch ($a) {
185 185
         case 1:
186 186
             if (empty($b))
187 187
                 return 0;
@@ -212,14 +212,14 @@  discard block
 block discarded – undo
212 212
 
213 213
 function foo()
214 214
 {
215
-    return $bar->{$action . 'JsonAction'}();
215
+    return $bar->{$action.'JsonAction'}();
216 216
 }
217 217
 
218 218
 switch (true) {
219 219
     case 1:
220 220
         return foo(
221
-            function () {
222
-                $foo = $bar;  // when this is removed it works ok
221
+            function() {
222
+                $foo = $bar; // when this is removed it works ok
223 223
                 return false; // from here on it reports unreachable
224 224
             }
225 225
         );
Please login to merge, or discard this patch.
Braces   +16 added lines, -12 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@  discard block
 block discarded – undo
60 60
 
61 61
 while ($line=fgets($fp,2*1024*1024))
62 62
 {
63
-    if (!preg_match("/^<([a-z0-9_]+)/",$line,$matches))
64
-    continue;
63
+    if (!preg_match("/^<([a-z0-9_]+)/",$line,$matches)) {
64
+        continue;
65
+    }
65 66
     print $line;
66 67
 }
67 68
 
@@ -183,19 +184,21 @@  discard block
 block discarded – undo
183 184
 function test(){
184 185
     switch($a) {
185 186
         case 1:
186
-            if (empty($b))
187
-                return 0;
187
+            if (empty($b)) {
188
+                            return 0;
189
+            }
188 190
             break;
189 191
         default:
190 192
             return 2;
191 193
     }
192 194
 
193
-    if (empty($a))
194
-        echo '1';
195
-    elseif ($empty($b))
196
-        return 0;
197
-    else
198
-        return 1;
195
+    if (empty($a)) {
196
+            echo '1';
197
+    } elseif ($empty($b)) {
198
+            return 0;
199
+    } else {
200
+            return 1;
201
+    }
199 202
 
200 203
     echo "oi";
201 204
     return 1;
@@ -203,8 +206,9 @@  discard block
 block discarded – undo
203 206
 
204 207
 switch ($foo) {
205 208
     case 'foo':
206
-        if ($foo)
207
-            return $foo;
209
+        if ($foo) {
210
+                    return $foo;
211
+        }
208 212
         return $bar;
209 213
     default:
210 214
         return $bar;
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
                 94  => 2,
69 69
                 100 => 1,
70 70
                 102 => 1,
71
-               );
71
+                );
72 72
 
73 73
     }//end getErrorList()
74 74
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                 8  => 1,
46 46
                 13 => 1,
47 47
                 15 => 1,
48
-               );
48
+                );
49 49
 
50 50
     }//end getErrorList()
51 51
 
Please login to merge, or discard this patch.
Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-function getVar($varname='var', $var='var')
2
+function getVar($varname = 'var', $var = 'var')
3 3
 {
4 4
     $var = $var2 = getVar();
5 5
     $var = $var2 = $var3 = '';
@@ -38,5 +38,5 @@  discard block
 block discarded – undo
38 38
 
39 39
 $obj->$classVar = $prefix.'-'.$type;
40 40
 
41
-$closureWithDefaultParamter = function(array $testArray=array()) {};
41
+$closureWithDefaultParamter = function(array $testArray = array()) {};
42 42
 ?>
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,13 +65,13 @@
 block discarded – undo
65 65
                     15 => 1,
66 66
                     19 => 1,
67 67
                     87 => 1,
68
-                   );
68
+                    );
69 69
             break;
70 70
         case 'CommentedOutCodeUnitTest.css':
71 71
             return array(
72 72
                     7  => 1,
73 73
                     16 => 1,
74
-                   );
74
+                    );
75 75
             break;
76 76
         default:
77 77
             return array();
Please login to merge, or discard this patch.
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -58,24 +58,24 @@
 block discarded – undo
58 58
     public function getWarningList($testFile='CommentedOutCodeUnitTest.inc')
59 59
     {
60 60
         switch ($testFile) {
61
-        case 'CommentedOutCodeUnitTest.inc':
62
-            return array(
63
-                    6  => 1,
64
-                    8  => 1,
65
-                    15 => 1,
66
-                    19 => 1,
67
-                    87 => 1,
68
-                   );
69
-            break;
70
-        case 'CommentedOutCodeUnitTest.css':
71
-            return array(
72
-                    7  => 1,
73
-                    16 => 1,
74
-                   );
75
-            break;
76
-        default:
77
-            return array();
78
-            break;
61
+            case 'CommentedOutCodeUnitTest.inc':
62
+                return array(
63
+                        6  => 1,
64
+                        8  => 1,
65
+                        15 => 1,
66
+                        19 => 1,
67
+                        87 => 1,
68
+                       );
69
+                break;
70
+            case 'CommentedOutCodeUnitTest.css':
71
+                return array(
72
+                        7  => 1,
73
+                        16 => 1,
74
+                       );
75
+                break;
76
+            default:
77
+                return array();
78
+                break;
79 79
         }//end switch
80 80
 
81 81
     }//end getWarningList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      *
56 56
      * @return array<int, int>
57 57
      */
58
-    public function getWarningList($testFile='CommentedOutCodeUnitTest.inc')
58
+    public function getWarningList($testFile = 'CommentedOutCodeUnitTest.inc')
59 59
     {
60 60
         switch ($testFile) {
61 61
         case 'CommentedOutCodeUnitTest.inc':
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         return array(
46 46
                 2 => 1,
47 47
                 4 => 1,
48
-               );
48
+                );
49 49
 
50 50
     }//end getErrorList()
51 51
 
Please login to merge, or discard this patch.