Completed
Pull Request — master (#7)
by Tomáš
09:48 queued 03:17
created
src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/PHP/EvalUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 // Closures are allowed.
11 11
 function myFunc($foo)
12 12
 {
13
-    $callback = function ($bar) use ($foo)
13
+    $callback = function($bar) use ($foo)
14 14
                 {
15 15
                     $bar += $foo;
16 16
                 };
Please login to merge, or discard this patch.
src/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.
src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/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.
src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.php 2 patches
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='DisallowInlineIfUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'DisallowInlineIfUnitTest.inc':
32
-            return array(8 => 1);
33
-            break;
34
-        case 'DisallowInlineIfUnitTest.js':
35
-            return array(1 => 1);
36
-            break;
37
-        default:
38
-            return array();
39
-            break;
31
+            case 'DisallowInlineIfUnitTest.inc':
32
+                return array(8 => 1);
33
+                break;
34
+            case 'DisallowInlineIfUnitTest.js':
35
+                return array(1 => 1);
36
+                break;
37
+            default:
38
+                return array();
39
+                break;
40 40
         }//end switch
41 41
 
42 42
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      *
41 41
      * @return array<int, int>
42 42
      */
43
-    public function getErrorList($testFile='DisallowInlineIfUnitTest.inc')
43
+    public function getErrorList($testFile = 'DisallowInlineIfUnitTest.inc')
44 44
     {
45 45
         switch ($testFile) {
46 46
         case 'DisallowInlineIfUnitTest.inc':
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 do {
53 53
     echo $a->count;
54 54
     $a->count--;
55
-} while($a->count);
55
+} while ($a->count);
56 56
 
57 57
 for ($i = 0; $i < $a->count; $i++) {}
58 58
 ?>
Please login to merge, or discard this patch.
src/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.