Completed
Branch master (d87ed9)
by Tomáš
06:31
created
CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -85,15 +85,15 @@  discard block
 block discarded – undo
85 85
 
86 86
         // Predicate nodes for PHP.
87 87
         $find = array(
88
-                 T_CASE    => true,
89
-                 T_DEFAULT => true,
90
-                 T_CATCH   => true,
91
-                 T_IF      => true,
92
-                 T_FOR     => true,
93
-                 T_FOREACH => true,
94
-                 T_WHILE   => true,
95
-                 T_DO      => true,
96
-                 T_ELSEIF  => true,
88
+                    T_CASE    => true,
89
+                    T_DEFAULT => true,
90
+                    T_CATCH   => true,
91
+                    T_IF      => true,
92
+                    T_FOR     => true,
93
+                    T_FOREACH => true,
94
+                    T_WHILE   => true,
95
+                    T_DO      => true,
96
+                    T_ELSEIF  => true,
97 97
                 );
98 98
 
99 99
         $complexity = 1;
@@ -108,16 +108,16 @@  discard block
 block discarded – undo
108 108
         if ($complexity > $this->absoluteComplexity) {
109 109
             $error = 'Function\'s cyclomatic complexity (%s) exceeds allowed maximum of %s';
110 110
             $data  = array(
111
-                      $complexity,
112
-                      $this->absoluteComplexity,
113
-                     );
111
+                        $complexity,
112
+                        $this->absoluteComplexity,
113
+                        );
114 114
             $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data);
115 115
         } else if ($complexity > $this->complexity) {
116 116
             $warning = 'Function\'s cyclomatic complexity (%s) exceeds %s; consider refactoring the function';
117 117
             $data    = array(
118 118
                         $complexity,
119 119
                         $this->complexity,
120
-                       );
120
+                        );
121 121
             $phpcsFile->addWarning($warning, $stackPtr, 'TooHigh', $data);
122 122
         }
123 123
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     /**
42 42
      * Returns an array of tokens this test wants to listen for.
43 43
      *
44
-     * @return array
44
+     * @return integer[]
45 45
      */
46 46
     public function register()
47 47
     {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,24 +62,24 @@
 block discarded – undo
62 62
             return array(
63 63
                     6 => 1,
64 64
                     7 => 1,
65
-                   );
65
+                    );
66 66
             break;
67 67
         case 'DuplicateClassNameUnitTest.2.inc':
68 68
             return array(
69 69
                     2 => 1,
70 70
                     3 => 1,
71
-                   );
71
+                    );
72 72
             break;
73 73
         case 'DuplicateClassNameUnitTest.5.inc':
74 74
             return array(
75 75
                     3 => 1,
76 76
                     7 => 1,
77
-                   );
77
+                    );
78 78
             break;
79 79
         case 'DuplicateClassNameUnitTest.6.inc':
80 80
             return array(
81 81
                     10 => 1,
82
-                   );
82
+                    );
83 83
             break;
84 84
         default:
85 85
             return array();
Please login to merge, or discard this patch.
Switch Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -58,32 +58,32 @@
 block discarded – undo
58 58
     public function getWarningList($testFile='')
59 59
     {
60 60
         switch ($testFile) {
61
-        case 'DuplicateClassNameUnitTest.1.inc':
62
-            return array(
63
-                    6 => 1,
64
-                    7 => 1,
65
-                   );
66
-            break;
67
-        case 'DuplicateClassNameUnitTest.2.inc':
68
-            return array(
69
-                    2 => 1,
70
-                    3 => 1,
71
-                   );
72
-            break;
73
-        case 'DuplicateClassNameUnitTest.5.inc':
74
-            return array(
75
-                    3 => 1,
76
-                    7 => 1,
77
-                   );
78
-            break;
79
-        case 'DuplicateClassNameUnitTest.6.inc':
80
-            return array(
81
-                    10 => 1,
82
-                   );
83
-            break;
84
-        default:
85
-            return array();
86
-            break;
61
+            case 'DuplicateClassNameUnitTest.1.inc':
62
+                return array(
63
+                        6 => 1,
64
+                        7 => 1,
65
+                       );
66
+                break;
67
+            case 'DuplicateClassNameUnitTest.2.inc':
68
+                return array(
69
+                        2 => 1,
70
+                        3 => 1,
71
+                       );
72
+                break;
73
+            case 'DuplicateClassNameUnitTest.5.inc':
74
+                return array(
75
+                        3 => 1,
76
+                        7 => 1,
77
+                       );
78
+                break;
79
+            case 'DuplicateClassNameUnitTest.6.inc':
80
+                return array(
81
+                        10 => 1,
82
+                       );
83
+                break;
84
+            default:
85
+                return array();
86
+                break;
87 87
         }//end switch
88 88
 
89 89
     }//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='')
58
+    public function getWarningList($testFile = '')
59 59
     {
60 60
         switch ($testFile) {
61 61
         case 'DuplicateClassNameUnitTest.1.inc':
Please login to merge, or discard this patch.
Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.6.inc 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 class Test{
3 3
     public function testOne(){
4
-     ?>
4
+        ?>
5 5
      <p>some html here</p>
6 6
     <?php 
7
-   }
7
+    }
8 8
 }
9 9
 
10 10
 class Test{
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2
-class Test{
3
-    public function testOne(){
2
+class Test {
3
+    public function testOne() {
4 4
      ?>
5 5
      <p>some html here</p>
6 6
     <?php 
7 7
    }
8 8
 }
9 9
 
10
-class Test{
10
+class Test {
11 11
 
12 12
 }
Please login to merge, or discard this patch.
Generic/Tests/ControlStructures/InlineControlStructureUnitTest.php 3 patches
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='InlineControlStructureUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'InlineControlStructureUnitTest.inc':
49
-            return array(
50
-                    3   => 1,
51
-                    7   => 1,
52
-                    11  => 1,
53
-                    13  => 1,
54
-                    15  => 1,
55
-                    17  => 1,
56
-                    23  => 1,
57
-                    42  => 1,
58
-                    43  => 1,
59
-                    45  => 1,
60
-                    46  => 1,
61
-                    49  => 1,
62
-                    62  => 1,
63
-                    66  => 1,
64
-                    78  => 1,
65
-                    120 => 1,
66
-                    128 => 1,
67
-                    134 => 1,
68
-                    142 => 1,
69
-                    143 => 1,
70
-                    144 => 1,
71
-                    150 => 1,
72
-                    158 => 1,
73
-                    159 => 1,
74
-                    162 => 1,
75
-                    163 => 1,
76
-                    164 => 1,
77
-                   );
78
-            break;
79
-        case 'InlineControlStructureUnitTest.js':
80
-            return array(
81
-                    3  => 1,
82
-                    7  => 1,
83
-                    11 => 1,
84
-                    13 => 1,
85
-                    15 => 1,
86
-                    21 => 1,
87
-                   );
88
-            break;
89
-        default:
90
-            return array();
91
-            break;
48
+            case 'InlineControlStructureUnitTest.inc':
49
+                return array(
50
+                        3   => 1,
51
+                        7   => 1,
52
+                        11  => 1,
53
+                        13  => 1,
54
+                        15  => 1,
55
+                        17  => 1,
56
+                        23  => 1,
57
+                        42  => 1,
58
+                        43  => 1,
59
+                        45  => 1,
60
+                        46  => 1,
61
+                        49  => 1,
62
+                        62  => 1,
63
+                        66  => 1,
64
+                        78  => 1,
65
+                        120 => 1,
66
+                        128 => 1,
67
+                        134 => 1,
68
+                        142 => 1,
69
+                        143 => 1,
70
+                        144 => 1,
71
+                        150 => 1,
72
+                        158 => 1,
73
+                        159 => 1,
74
+                        162 => 1,
75
+                        163 => 1,
76
+                        164 => 1,
77
+                       );
78
+                break;
79
+            case 'InlineControlStructureUnitTest.js':
80
+                return array(
81
+                        3  => 1,
82
+                        7  => 1,
83
+                        11 => 1,
84
+                        13 => 1,
85
+                        15 => 1,
86
+                        21 => 1,
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='InlineControlStructureUnitTest.inc')
45
+    public function getErrorList($testFile = 'InlineControlStructureUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'InlineControlStructureUnitTest.inc':
Please login to merge, or discard this patch.
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.
Generic/Tests/ControlStructures/InlineControlStructureUnitTest.inc 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 } while ($something);
22 22
 
23 23
 if(true)
24
-  $someObject->{$name};
24
+    $someObject->{$name};
25 25
 
26 26
 if (true) :
27 27
     $foo = true;
Please login to merge, or discard this patch.
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,11 +109,11 @@
 block discarded – undo
109 109
 switch($response = \Bar::baz('bat', function ($foo) {
110 110
     return 'bar';
111 111
 })) {
112
-    case 1:
113
-        return 'test';
112
+        case 1:
113
+            return 'test';
114 114
 
115
-    case 2:
116
-        return 'other';
115
+        case 2:
116
+            return 'other';
117 117
 }
118 118
 
119 119
 $stuff = [1,2,3];
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     $i--;
21 21
 } while ($something);
22 22
 
23
-if(true)
23
+if (true)
24 24
   $someObject->{$name};
25 25
 
26 26
 if (true) :
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
 function test()
61 61
 {
62 62
     if ($a)
63
-        $a.=' '.($b ? 'b' : ($c ? ($d ? 'd' : 'c') : ''));
63
+        $a .= ' '.($b ? 'b' : ($c ? ($d ? 'd' : 'c') : ''));
64 64
 }
65 65
 
66 66
 if ($a)
67 67
     foreach ($b as $c) {
68 68
         if ($d) {
69
-            $e=$f;
70
-            $g=$h;
71
-        } elseif ($i==0) {
72
-            $j=$k;
69
+            $e = $f;
70
+            $g = $h;
71
+        } elseif ($i == 0) {
72
+            $j = $k;
73 73
         }
74 74
     }
75 75
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     } else {
107 107
     }
108 108
 
109
-switch($response = \Bar::baz('bat', function ($foo) {
109
+switch ($response = \Bar::baz('bat', function($foo) {
110 110
     return 'bar';
111 111
 })) {
112 112
     case 1:
@@ -116,22 +116,22 @@  discard block
 block discarded – undo
116 116
         return 'other';
117 117
 }
118 118
 
119
-$stuff = [1,2,3];
120
-foreach($stuff as $num)
121
-    if ($num %2 ) {
119
+$stuff = [1, 2, 3];
120
+foreach ($stuff as $num)
121
+    if ($num % 2) {
122 122
         echo "even";
123 123
     } else {
124 124
         echo "odd";
125 125
     }
126 126
 
127 127
 $i = 0;
128
-foreach($stuff as $num)
128
+foreach ($stuff as $num)
129 129
     do {
130 130
         echo $i;
131 131
         $i++;
132 132
     } while ($i < 5);
133 133
 
134
-foreach($stuff as $num)
134
+foreach ($stuff as $num)
135 135
     if (true) {
136 136
         echo "true1\n";
137 137
     }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 }
157 157
 
158 158
 foreach ($sql as $s)
159
-        if (!$this->execute) echo "<pre>",$s.";\n</pre>";
159
+        if (!$this->execute) echo "<pre>", $s.";\n</pre>";
160 160
         else {
161 161
             $ok = $this->connDest->Execute($s);
162 162
             if (!$ok)
Please login to merge, or discard this patch.
Braces   +64 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,27 +1,40 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ($something) echo 'hello';
3
+if ($something) {
4
+    echo 'hello';
5
+}
4 6
 
5 7
 if ($something) {
6 8
     echo 'hello';
7
-} else echo 'hi';
9
+} else {
10
+    echo 'hi';
11
+}
8 12
 
9 13
 if ($something) {
10 14
     echo 'hello';
11
-} else if ($else) echo 'hi';
15
+} else if ($else) {
16
+    echo 'hi';
17
+}
12 18
 
13
-foreach ($something as $thing) echo 'hello';
19
+foreach ($something as $thing) {
20
+    echo 'hello';
21
+}
14 22
 
15
-for ($i; $i > 0; $i--) echo 'hello';
23
+for ($i; $i > 0; $i--) {
24
+    echo 'hello';
25
+}
16 26
 
17
-while ($something) echo 'hello';
27
+while ($something) {
28
+    echo 'hello';
29
+}
18 30
 
19 31
 do {
20 32
     $i--;
21 33
 } while ($something);
22 34
 
23
-if(true)
35
+if(true) {
24 36
   $someObject->{$name};
37
+}
25 38
 
26 39
 if (true) :
27 40
     $foo = true;
@@ -42,31 +55,38 @@  discard block
 block discarded – undo
42 55
 while (!$this->readLine($tokens, $tag));
43 56
 while (!$this->readLine($tokens, $tag)); //skip to end of file
44 57
 
45
-foreach ($cookies as $cookie)
58
+foreach ($cookies as $cookie) {
46 59
     if ($cookie->match($uri, $matchSessionCookies, $now))
47 60
         $ret[] = $cookie;
61
+}
48 62
 
49
-foreach ($stringParade as $hit)
50
-    $hitParade[] = $hit + 0; //cast to integer
63
+foreach ($stringParade as $hit) {
64
+    $hitParade[] = $hit + 0;
65
+}
66
+//cast to integer
51 67
 
52 68
 if ($foo) :
53 69
     echo 'true';
54 70
 elseif ($something) :
55 71
     echo 'foo';
56
-else:
72
+else {
73
+    :
57 74
     echo 'false';
75
+}
58 76
 endif;
59 77
 
60 78
 function test()
61 79
 {
62
-    if ($a)
63
-        $a.=' '.($b ? 'b' : ($c ? ($d ? 'd' : 'c') : ''));
64
-}
80
+    if ($a) {
81
+            $a.=' '.($b ? 'b' : ($c ? ($d ? 'd' : 'c') : ''));
82
+    }
83
+    }
65 84
 
66
-if ($a)
85
+if ($a) {
67 86
     foreach ($b as $c) {
68 87
         if ($d) {
69 88
             $e=$f;
89
+}
70 90
             $g=$h;
71 91
         } elseif ($i==0) {
72 92
             $j=$k;
@@ -75,7 +95,8 @@  discard block
 block discarded – undo
75 95
 
76 96
 ?>
77 97
 <div style="text-align: right;">
78
-    <?php if ($model->scenario == 'simple') $widget->renderPager() ?>
98
+    <?php if ($model->scenario == 'simple') {
99
+    $widget->renderPager() ?>
79 100
 </div>
80 101
 
81 102
 <?php
@@ -83,6 +104,7 @@  discard block
 block discarded – undo
83 104
     case Shop_Customer :: ERROR_INVALID_GENDER: ?>
84 105
         Ung&uuml;ltiges Geschlecht!
85 106
     <?php break;
107
+}
86 108
     case Shop_Customer :: ERROR_EMAIL_IN_USE: ?>
87 109
         Die eingetragene E-Mail-Adresse ist bereits registriert.
88 110
     <?php break;
@@ -95,8 +117,10 @@  discard block
 block discarded – undo
95 117
             echo 'foo';
96 118
         endswitch;
97 119
     endif;
98
-else:
120
+else {
121
+    :
99 122
     echo 'foo';
123
+}
100 124
 endif;
101 125
 
102 126
 // ELSE IF split over multiple lines (not inline)
@@ -117,49 +141,59 @@  discard block
 block discarded – undo
117 141
 }
118 142
 
119 143
 $stuff = [1,2,3];
120
-foreach($stuff as $num)
144
+foreach($stuff as $num) {
121 145
     if ($num %2 ) {
122 146
         echo "even";
147
+}
123 148
     } else {
124 149
         echo "odd";
125 150
     }
126 151
 
127 152
 $i = 0;
128
-foreach($stuff as $num)
153
+foreach($stuff as $num) {
129 154
     do {
130 155
         echo $i;
156
+}
131 157
         $i++;
132 158
     } while ($i < 5);
133 159
 
134
-foreach($stuff as $num)
160
+foreach($stuff as $num) {
135 161
     if (true) {
136 162
         echo "true1\n";
163
+}
137 164
     }
138 165
     if (true) {
139 166
         echo "true2\n";
140 167
     }
141 168
 
142
-if ($foo) echo 'foo';
143
-elseif ($bar) echo 'bar';
144
-else echo 'baz';
169
+if ($foo) {
170
+    echo 'foo';
171
+} elseif ($bar) {
172
+    echo 'bar';
173
+} else {
174
+    echo 'baz';
175
+}
145 176
 
146 177
 switch ($type) {
147 178
     case 1:
148 179
         if ($foo) {
149 180
             return true;
150
-        } elseif ($baz)
151
-            return true;
152
-        else {
181
+        } elseif ($baz) {
182
+                    return true;
183
+        } else {
153 184
             echo 'else';
154 185
         }
155 186
     break;
156 187
 }
157 188
 
158
-foreach ($sql as $s)
189
+foreach ($sql as $s) {
159 190
         if (!$this->execute) echo "<pre>",$s.";\n</pre>";
191
+}
160 192
         else {
161 193
             $ok = $this->connDest->Execute($s);
162
-            if (!$ok)
163
-                if ($this->neverAbort) $ret = false;
164
-                else return false;
194
+            if (!$ok) {
195
+                            if ($this->neverAbort) $ret = false;
196
+            } else {
197
+                    return false;
198
+                }
165 199
         }
Please login to merge, or discard this patch.
Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php 3 patches
Switch Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -43,28 +43,28 @@
 block discarded – undo
43 43
     public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc')
44 44
     {
45 45
         switch ($testFile) {
46
-        case 'UnnecessaryStringConcatUnitTest.inc':
47
-            return array(
48
-                    2  => 1,
49
-                    6  => 1,
50
-                    9  => 1,
51
-                    12 => 1,
52
-                    19 => 1,
53
-                    20 => 1,
54
-                   );
55
-            break;
56
-        case 'UnnecessaryStringConcatUnitTest.js':
57
-            return array(
58
-                    1  => 1,
59
-                    8  => 1,
60
-                    11 => 1,
61
-                    14 => 1,
62
-                    15 => 1,
63
-                   );
64
-            break;
65
-        default:
66
-            return array();
67
-            break;
46
+            case 'UnnecessaryStringConcatUnitTest.inc':
47
+                return array(
48
+                        2  => 1,
49
+                        6  => 1,
50
+                        9  => 1,
51
+                        12 => 1,
52
+                        19 => 1,
53
+                        20 => 1,
54
+                       );
55
+                break;
56
+            case 'UnnecessaryStringConcatUnitTest.js':
57
+                return array(
58
+                        1  => 1,
59
+                        8  => 1,
60
+                        11 => 1,
61
+                        14 => 1,
62
+                        15 => 1,
63
+                       );
64
+                break;
65
+            default:
66
+                return array();
67
+                break;
68 68
         }
69 69
 
70 70
     }//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='UnnecessaryStringConcatUnitTest.inc')
43
+    public function getErrorList($testFile = 'UnnecessaryStringConcatUnitTest.inc')
44 44
     {
45 45
         switch ($testFile) {
46 46
         case 'UnnecessaryStringConcatUnitTest.inc':
Please login to merge, or discard this patch.
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.
Standards/Generic/Tests/Arrays/DisallowShortArraySyntaxUnitTest.inc 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         1
10 10
         2
11 11
         3
12
-       ];
13 12
\ No newline at end of file
13
+        ];
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 $var = array();
3 3
 $var = [];
4
-$var = array(1,2,3);
5
-$var = [1,2,3];
4
+$var = array(1, 2, 3);
5
+$var = [1, 2, 3];
6 6
 echo $var[1];
7
-$foo = [$var[1],$var[2]];
7
+$foo = [$var[1], $var[2]];
8 8
 $foo = [
9 9
         1
10 10
         2
Please login to merge, or discard this patch.
Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.inc 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
         1
9 9
         2
10 10
         3
11
-       );
11
+        );
12 12
 $var = array/*comment*/(1,2,3);
13 13
 $var = array;
14 14
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 $var = array();
3
-$var = [1,2,3];
4
-$var = array(1,2,3);
3
+$var = [1, 2, 3];
4
+$var = array(1, 2, 3);
5 5
 echo $var[1];
6
-$foo = array($var[1],$var[2]);
6
+$foo = array($var[1], $var[2]);
7 7
 $foo = array(
8 8
         1
9 9
         2
10 10
         3
11 11
        );
12
-$var = array/*comment*/(1,2,3);
12
+$var = array/*comment*/(1, 2, 3);
13 13
 $var = array;
14 14
 
15 15
 function foo(array $array) {}
Please login to merge, or discard this patch.
CodeSniffer/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.php 3 patches
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@
 block discarded – undo
43 43
     public function getErrorList($testFile='')
44 44
     {
45 45
         switch ($testFile) {
46
-        case 'EndFileNewlineUnitTest.3.inc':
47
-        case 'EndFileNewlineUnitTest.3.js':
48
-        case 'EndFileNewlineUnitTest.3.css':
49
-            return array(
50
-                    2 => 1,
51
-                   );
52
-            break;
53
-        default:
54
-            return array();
55
-            break;
46
+            case 'EndFileNewlineUnitTest.3.inc':
47
+            case 'EndFileNewlineUnitTest.3.js':
48
+            case 'EndFileNewlineUnitTest.3.css':
49
+                return array(
50
+                        2 => 1,
51
+                       );
52
+                break;
53
+            default:
54
+                return array();
55
+                break;
56 56
         }//end switch
57 57
 
58 58
     }//end getErrorList()
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         case 'CharacterBeforePHPOpeningTagUnitTest.1.inc':
47 47
             return array(
48 48
                     2 => 1,
49
-                   );
49
+                    );
50 50
             break;
51 51
         default:
52 52
             return array();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @return array<int, int>
42 42
      */
43
-    public function getErrorList($testFile='')
43
+    public function getErrorList($testFile = '')
44 44
     {
45 45
         switch ($testFile) {
46 46
         case 'EndFileNoNewlineUnitTest.1.inc':
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      *
76 76
      * @return array<int, int>
77 77
      */
78
-    public function getWarningList($testFile='')
78
+    public function getWarningList($testFile = '')
79 79
     {
80 80
         return array();
81 81
 
Please login to merge, or discard this patch.