Completed
Branch master (d87ed9)
by Tomáš
07:16
created
CodeSniffer/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -259,13 +259,13 @@
 block discarded – undo
259 259
 // Closures should be ignored.
260 260
 preg_replace_callback(
261 261
     '~-([a-z])~',
262
-    function ($match) {
262
+    function($match) {
263 263
         return strtoupper($match[1]);
264 264
     },
265 265
     'hello-world'
266 266
 );
267 267
 
268
-$callback = function ($bar) use ($foo)
268
+$callback = function($bar) use ($foo)
269 269
             {
270 270
                 $bar += $foo;
271 271
             };
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                     6 => 1,
54 54
                     8 => 1,
55 55
                     9 => 1,
56
-                   );
56
+                    );
57 57
             break;
58 58
         case 'SemicolonSpacingUnitTest.js':
59 59
             return array(
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                     10 => 2,
64 64
                     11 => 1,
65 65
                     13 => 1,
66
-                   );
66
+                    );
67 67
             break;
68 68
         default:
69 69
             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.
CodeSniffer/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.
CodeSniffer/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
                 11 => 1,
47 47
                 13 => 1,
48 48
                 24 => 1,
49
-               );
49
+                );
50 50
 
51 51
     }//end getErrorList()
52 52
 
Please login to merge, or discard this patch.
Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
                 6  => 3,
49 49
                 15 => 1,
50 50
                 17 => 1,
51
-               );
51
+                );
52 52
 
53 53
     }//end getErrorList()
54 54
 
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='LogicalOperatorSpacingUnitTest.inc')
43
+    public function getErrorList($testFile = 'LogicalOperatorSpacingUnitTest.inc')
44 44
     {
45 45
         return array(
46 46
                 4  => 2,
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                 106 => 1,
56 56
                 115 => 1,
57 57
                 150 => 1,
58
-               );
58
+                );
59 59
 
60 60
     }//end getErrorList()
61 61
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.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
                 289 => 1,
69 69
                 291 => 1,
70 70
                 297 => 1,
71
-               );
71
+                );
72 72
 
73 73
     }//end getErrorList()
74 74
 
Please login to merge, or discard this patch.
Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                     176 => 2,
70 70
                     179 => 1,
71 71
                     189 => 1,
72
-                   );
72
+                    );
73 73
             break;
74 74
         case 'ControlStructureSpacingUnitTest.js':
75 75
             return array(
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                     68 => 1,
85 85
                     74 => 2,
86 86
                     75 => 2,
87
-                   );
87
+                    );
88 88
             break;
89 89
         default:
90 90
             return array();
Please login to merge, or discard this patch.
Switch Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -45,50 +45,50 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='ControlStructureSpacingUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'ControlStructureSpacingUnitTest.inc':
49
-            return array(
50
-                    3   => 1,
51
-                    5   => 1,
52
-                    8   => 1,
53
-                    15  => 1,
54
-                    23  => 1,
55
-                    74  => 1,
56
-                    79  => 1,
57
-                    82  => 1,
58
-                    83  => 1,
59
-                    87  => 1,
60
-                    103 => 1,
61
-                    113 => 2,
62
-                    114 => 2,
63
-                    118 => 1,
64
-                    150 => 1,
65
-                    153 => 1,
66
-                    154 => 1,
67
-                    157 => 1,
68
-                    170 => 1,
69
-                    176 => 2,
70
-                    179 => 1,
71
-                    189 => 1,
72
-                   );
73
-            break;
74
-        case 'ControlStructureSpacingUnitTest.js':
75
-            return array(
76
-                    3  => 1,
77
-                    9  => 1,
78
-                    15 => 1,
79
-                    21 => 1,
80
-                    56 => 1,
81
-                    61 => 1,
82
-                    64 => 1,
83
-                    65 => 1,
84
-                    68 => 1,
85
-                    74 => 2,
86
-                    75 => 2,
87
-                   );
88
-            break;
89
-        default:
90
-            return array();
91
-            break;
48
+            case 'ControlStructureSpacingUnitTest.inc':
49
+                return array(
50
+                        3   => 1,
51
+                        5   => 1,
52
+                        8   => 1,
53
+                        15  => 1,
54
+                        23  => 1,
55
+                        74  => 1,
56
+                        79  => 1,
57
+                        82  => 1,
58
+                        83  => 1,
59
+                        87  => 1,
60
+                        103 => 1,
61
+                        113 => 2,
62
+                        114 => 2,
63
+                        118 => 1,
64
+                        150 => 1,
65
+                        153 => 1,
66
+                        154 => 1,
67
+                        157 => 1,
68
+                        170 => 1,
69
+                        176 => 2,
70
+                        179 => 1,
71
+                        189 => 1,
72
+                       );
73
+                break;
74
+            case 'ControlStructureSpacingUnitTest.js':
75
+                return array(
76
+                        3  => 1,
77
+                        9  => 1,
78
+                        15 => 1,
79
+                        21 => 1,
80
+                        56 => 1,
81
+                        61 => 1,
82
+                        64 => 1,
83
+                        65 => 1,
84
+                        68 => 1,
85
+                        74 => 2,
86
+                        75 => 2,
87
+                       );
88
+                break;
89
+            default:
90
+                return array();
91
+                break;
92 92
         }//end switch
93 93
 
94 94
     }//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='ControlStructureSpacingUnitTest.inc')
45
+    public function getErrorList($testFile = 'ControlStructureSpacingUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'ControlStructureSpacingUnitTest.inc':
Please login to merge, or discard this patch.
CodeSniffer/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.