Completed
Push — master ( 8cd077 )
by Tomáš
09:25
created
src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 $var = (int) $var2;
3
-$var = ( int ) $var2;
4
-$var = (int ) $var2;
5
-$var = ( int) $var2;
6
-$var = (	int	) $var2;
3
+$var = (int) $var2;
4
+$var = (int) $var2;
5
+$var = (int) $var2;
6
+$var = (int) $var2;
7 7
 ?>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,8 +111,8 @@
 block discarded – undo
111 111
 $closureWithDefaultParameter = function (array $testArray=array()) {};
112 112
 
113 113
 switch ($foo) {
114
-	case -1:
115
-		break;
114
+    case -1:
115
+        break;
116 116
 }
117 117
 
118 118
 $y = 1 * -1;
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -1,67 +1,67 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $result = 1 + 2;
4
-$result = 1  + 2;
5
-$result = 1  +   2;
6
-$result = 1 +2;
7
-$result = 1+ 2;
8
-$result = 1+2;
4
+$result = 1 + 2;
5
+$result = 1 + 2;
6
+$result = 1 + 2;
7
+$result = 1 + 2;
8
+$result = 1 + 2;
9 9
 
10 10
 $result = 1 - 2;
11
-$result = 1  - 2;
12
-$result = 1  -   2;
13
-$result = 1 -2;
14
-$result = 1- 2;
15
-$result = 1-2;
11
+$result = 1 - 2;
12
+$result = 1 - 2;
13
+$result = 1 - 2;
14
+$result = 1 - 2;
15
+$result = 1 - 2;
16 16
 
17 17
 $result = 1 * 2;
18
-$result = 1  * 2;
19
-$result = 1  *   2;
20
-$result = 1 *2;
21
-$result = 1* 2;
22
-$result = 1*2;
18
+$result = 1 * 2;
19
+$result = 1 * 2;
20
+$result = 1 * 2;
21
+$result = 1 * 2;
22
+$result = 1 * 2;
23 23
 
24 24
 $result = 1 / 2;
25
-$result = 1  / 2;
26
-$result = 1  /   2;
27
-$result = 1 /2;
28
-$result = 1/ 2;
29
-$result = 1/2;
25
+$result = 1 / 2;
26
+$result = 1 / 2;
27
+$result = 1 / 2;
28
+$result = 1 / 2;
29
+$result = 1 / 2;
30 30
 
31 31
 $result = 1 % 2;
32
-$result = 1  % 2;
33
-$result = 1  %   2;
34
-$result = 1 %2;
35
-$result = 1% 2;
36
-$result = 1%2;
32
+$result = 1 % 2;
33
+$result = 1 % 2;
34
+$result = 1 % 2;
35
+$result = 1 % 2;
36
+$result = 1 % 2;
37 37
 $result = '100%';
38 38
 
39 39
 $result += 4;
40
-$result+=4;
40
+$result += 4;
41
+$result -= 4;
41 42
 $result -= 4;
42
-$result-=4;
43 43
 $result /= 4;
44
-$result/=4;
45
-$result *=4;
46
-$result*=4;
44
+$result /= 4;
45
+$result *= 4;
46
+$result *= 4;
47 47
 
48
-$result =& $thing;
48
+$result = & $thing;
49 49
 if ($result & 4) {
50 50
     if ($result | 4) {
51 51
     }
52 52
 }
53
-if ($result&4 && $result  &  4) {
54
-    if ($result |4 || $result  |  4) {
53
+if ($result & 4 && $result & 4) {
54
+    if ($result | 4 || $result | 4) {
55 55
     }
56 56
 }
57 57
 
58 58
 $result = ((1 + 2) - (3 * 4 / 5) % 6);
59
-$result = ((1+  2)  -  (3*4/5)  %  6);
59
+$result = ((1 + 2) - (3 * 4 / 5) % 6);
60 60
 return -1;
61 61
 $file = '...'.substr($file, (($padding * -1) + 3));
62 62
 
63 63
 $totalErrors   += $errors['errors'];
64
-$totalWarnings +=  $errors['warnings'];
64
+$totalWarnings += $errors['warnings'];
65 65
 
66 66
 if (substr($line, 0, 3) === '/**') {
67 67
     $line = substr($line, 3);
@@ -74,23 +74,23 @@  discard block
 block discarded – undo
74 74
 if ($pos === -1) {
75 75
 }
76 76
 
77
-for ($i=0; $i<=5; $i++) {
78
-    $j^= $i;
79
-    $k %=$i;
80
-    $l&=$i;
81
-    $m.= 'Hello ';
77
+for ($i = 0; $i <= 5; $i++) {
78
+    $j ^= $i;
79
+    $k %= $i;
80
+    $l &= $i;
81
+    $m .= 'Hello ';
82 82
 }
83 83
 
84
-$z = ($a+ $b- $c* $d/ $e% $f^ $g);
85
-$z = ($a +$b -$c *$d /$e %$f ^$g);
84
+$z = ($a + $b - $c * $d / $e % $f ^ $g);
85
+$z = ($a + $b - $c * $d / $e % $f ^ $g);
86 86
 
87
-$a== $b && $c!= $d && $e=== $f && $g!== $h;
88
-$i> $j && $k< $l && $m>= $n && $o<= $p && $q<> $r;
87
+$a == $b && $c != $d && $e === $f && $g !== $h;
88
+$i > $j && $k < $l && $m >= $n && $o <= $p && $q <> $r;
89 89
 
90
-$a ==$b && $c !=$d && $e ===$f && $g !==$h;
91
-$i >$j && $k <$l && $m >=$n && $o <=$p && $q <>$r;
90
+$a == $b && $c != $d && $e === $f && $g !== $h;
91
+$i > $j && $k < $l && $m >= $n && $o <= $p && $q <> $r;
92 92
 
93
-function myFunction($variable=0, $var2='string') {}
93
+function myFunction($variable = 0, $var2 = 'string') {}
94 94
 
95 95
 if (index > -1) {
96 96
 }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 $y = $test ? 1 : -1;
109 109
 $z = $test ?: false;
110 110
 
111
-$closureWithDefaultParameter = function (array $testArray=array()) {};
111
+$closureWithDefaultParameter = function(array $testArray = array()) {};
112 112
 
113 113
 switch ($foo) {
114 114
 	case -1:
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 $y = 10 + -2;
126 126
 $y = -10 + 2;
127 127
 
128
-$a = $x?$y:$z;
128
+$a = $x ? $y : $z;
129 129
 $a = $x ? $y : $z;
130 130
 
131 131
 $y = 1
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 if ($a <=>$b) {
175 175
 }
176 176
 
177
-$a |=  $b;
177
+$a |= $b;
178 178
 $a **=  $b;
179 179
 
180 180
 $a = +1;
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.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/WhiteSpace/ScopeKeywordSpacingUnitTest.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/WhiteSpace/ControlStructureSpacingUnitTest.inc 3 patches
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -57,16 +57,16 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
173 173
 
174 174
 do {
175 175
     echo 'hi';
176
-} while (  $blah  );
176
+} while ($blah);
177 177
 
178 178
 if ($one) {
179 179
 }
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,8 +194,7 @@  discard block
 block discarded – undo
193 194
 
194 195
 try {
195 196
     // Something
196
-}
197
-catch (Exception $e) {
197
+} catch (Exception $e) {
198 198
     // Something
199 199
 }
200 200
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,20 +79,20 @@
 block discarded – undo
79 79
                     46 => 1,
80 80
                     47 => 1,
81 81
                     48 => 1,
82
-                   );
82
+                    );
83 83
             break;
84 84
         case 'DisallowTabIndentUnitTest.js':
85 85
             return array(
86 86
                     3 => 1,
87 87
                     5 => 1,
88 88
                     6 => 1,
89
-                   );
89
+                    );
90 90
             break;
91 91
         case 'DisallowTabIndentUnitTest.css':
92 92
             return array(
93 93
                     1 => 1,
94 94
                     2 => 1,
95
-                   );
95
+                    );
96 96
             break;
97 97
         default:
98 98
             return array();
Please login to merge, or discard this patch.
Switch Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -45,46 +45,46 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='SuperfluousWhitespaceUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'SuperfluousWhitespaceUnitTest.inc':
49
-            return array(
50
-                    2  => 1,
51
-                    4  => 1,
52
-                    5  => 1,
53
-                    6  => 1,
54
-                    7  => 1,
55
-                    16 => 1,
56
-                    23 => 1,
57
-                    28 => 1,
58
-                    33 => 1,
59
-                    53 => 1,
60
-                   );
61
-            break;
62
-        case 'SuperfluousWhitespaceUnitTest.1.js':
63
-            return array(
64
-                    1  => 1,
65
-                    3  => 1,
66
-                    4  => 1,
67
-                    5  => 1,
68
-                    6  => 1,
69
-                    15 => 1,
70
-                    22 => 1,
71
-                    29 => 1,
72
-                    38 => 1,
73
-                    56 => 1,
74
-                   );
75
-            break;
76
-        case 'SuperfluousWhitespaceUnitTest.1.css':
77
-            return array(
78
-                    1  => 1,
79
-                    8  => 1,
80
-                    9  => 1,
81
-                    11 => 1,
82
-                    25 => 1,
83
-                   );
84
-            break;
85
-        default:
86
-            return array();
87
-            break;
48
+            case 'SuperfluousWhitespaceUnitTest.inc':
49
+                return array(
50
+                        2  => 1,
51
+                        4  => 1,
52
+                        5  => 1,
53
+                        6  => 1,
54
+                        7  => 1,
55
+                        16 => 1,
56
+                        23 => 1,
57
+                        28 => 1,
58
+                        33 => 1,
59
+                        53 => 1,
60
+                       );
61
+                break;
62
+            case 'SuperfluousWhitespaceUnitTest.1.js':
63
+                return array(
64
+                        1  => 1,
65
+                        3  => 1,
66
+                        4  => 1,
67
+                        5  => 1,
68
+                        6  => 1,
69
+                        15 => 1,
70
+                        22 => 1,
71
+                        29 => 1,
72
+                        38 => 1,
73
+                        56 => 1,
74
+                       );
75
+                break;
76
+            case 'SuperfluousWhitespaceUnitTest.1.css':
77
+                return array(
78
+                        1  => 1,
79
+                        8  => 1,
80
+                        9  => 1,
81
+                        11 => 1,
82
+                        25 => 1,
83
+                       );
84
+                break;
85
+            default:
86
+                return array();
87
+                break;
88 88
         }//end switch
89 89
 
90 90
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @return array<int, int>
44 44
      */
45
-    public function getErrorList($testFile='SuperfluousWhitespaceUnitTest.inc')
45
+    public function getErrorList($testFile = 'SuperfluousWhitespaceUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'SuperfluousWhitespaceUnitTest.inc':
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Switch Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -45,29 +45,29 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='SemicolonSpacingUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'SemicolonSpacingUnitTest.inc':
49
-            return array(
50
-                    3 => 1,
51
-                    4 => 1,
52
-                    5 => 2,
53
-                    6 => 1,
54
-                    8 => 1,
55
-                    9 => 1,
56
-                   );
57
-            break;
58
-        case 'SemicolonSpacingUnitTest.js':
59
-            return array(
60
-                    3  => 1,
61
-                    4  => 1,
62
-                    6  => 1,
63
-                    10 => 2,
64
-                    11 => 1,
65
-                    13 => 1,
66
-                   );
67
-            break;
68
-        default:
69
-            return array();
70
-            break;
48
+            case 'SemicolonSpacingUnitTest.inc':
49
+                return array(
50
+                        3 => 1,
51
+                        4 => 1,
52
+                        5 => 2,
53
+                        6 => 1,
54
+                        8 => 1,
55
+                        9 => 1,
56
+                       );
57
+                break;
58
+            case 'SemicolonSpacingUnitTest.js':
59
+                return array(
60
+                        3  => 1,
61
+                        4  => 1,
62
+                        6  => 1,
63
+                        10 => 2,
64
+                        11 => 1,
65
+                        13 => 1,
66
+                       );
67
+                break;
68
+            default:
69
+                return array();
70
+                break;
71 71
         }//end switch
72 72
 
73 73
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @return array<int, int>
44 44
      */
45
-    public function getErrorList($testFile='SemicolonSpacingUnitTest.inc')
45
+    public function getErrorList($testFile = 'SemicolonSpacingUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'SemicolonSpacingUnitTest.inc':
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -43,35 +43,35 @@
 block discarded – undo
43 43
     public function getErrorList()
44 44
     {
45 45
         $errors = array(
46
-                   8   => 1,
47
-                   20  => 1,
48
-                   24  => 1,
49
-                   30  => 1,
50
-                   31  => 1,
51
-                   34  => 1,
52
-                   40  => 1,
53
-                   45  => 1,
54
-                   49  => 1,
55
-                   51  => 1,
56
-                   53  => 1,
57
-                   57  => 1,
58
-                   60  => 1,
59
-                   61  => 1,
60
-                   63  => 1,
61
-                   65  => 1,
62
-                   68  => 1,
63
-                   70  => 1,
64
-                   72  => 1,
65
-                   75  => 1,
66
-                   84  => 1,
67
-                   87  => 1,
68
-                   89  => 1,
69
-                   92  => 1,
70
-                   111 => 1,
71
-                   159 => 1,
72
-                   181 => 1,
73
-                   188 => 1,
74
-                  );
46
+                    8   => 1,
47
+                    20  => 1,
48
+                    24  => 1,
49
+                    30  => 1,
50
+                    31  => 1,
51
+                    34  => 1,
52
+                    40  => 1,
53
+                    45  => 1,
54
+                    49  => 1,
55
+                    51  => 1,
56
+                    53  => 1,
57
+                    57  => 1,
58
+                    60  => 1,
59
+                    61  => 1,
60
+                    63  => 1,
61
+                    65  => 1,
62
+                    68  => 1,
63
+                    70  => 1,
64
+                    72  => 1,
65
+                    75  => 1,
66
+                    84  => 1,
67
+                    87  => 1,
68
+                    89  => 1,
69
+                    92  => 1,
70
+                    111 => 1,
71
+                    159 => 1,
72
+                    181 => 1,
73
+                    188 => 1,
74
+                    );
75 75
 
76 76
         return $errors;
77 77
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.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.