Completed
Branch master (d87ed9)
by Tomáš
06:31
created
CodeSniffer/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,5 +8,5 @@
 block discarded – undo
8 8
 echo ($hello);
9 9
 echo ($loan_device->returndate == 0) ? 'Not returned' : date('d/m/Y', $loan_device->returndate);
10 10
 ?>
11
-<p><?php echo ($foo) ?  'true' : 'false' ?></p>
11
+<p><?php echo ($foo) ? 'true' : 'false' ?></p>
12 12
 <p><?php echo ($foo) ?></p>
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 $string = "\0";
17 17
 
18 18
 $x = "bar = '$z',
19
-baz = '" . $a . "'...$x";
19
+baz = '".$a."'...$x";
20 20
 
21 21
 $string = "Hello
22 22
 there";
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 $string = 'Hello' .$there;
7 7
 
8 8
 $y = '1'
9
-   . '2'
10
-   . '3';
9
+    . '2'
10
+    . '3';
11 11
 
12 12
 // @codingStandardsChangeSetting Squiz.Strings.ConcatenationSpacing spacing 1
13 13
 
@@ -19,18 +19,18 @@  discard block
 block discarded – undo
19 19
 
20 20
 // @codingStandardsChangeSetting Squiz.Strings.ConcatenationSpacing ignoreNewlines true
21 21
 $y = '1'
22
-   . '2'
23
-   . '3';
22
+    . '2'
23
+    . '3';
24 24
 
25 25
 $y = '1' .
26
-     '2' .
27
-     '3';
26
+        '2' .
27
+        '3';
28 28
 
29 29
 $y = '1'
30 30
 . '2'
31 31
 . '3';
32 32
 
33 33
 $y = '1'
34
-   .'2'.
34
+    .'2'.
35 35
     '3'
36
-   .  '4';
37 36
\ No newline at end of file
37
+    .  '4';
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $string = 'Hello'.$there.'. How are'.$you.$going."today $okay";
3
-$string = 'Hello' . $there . '. How are' . $you . $going . "today $okay";
3
+$string = 'Hello'.$there.'. How are'.$you.$going."today $okay";
4
+$string = 'Hello'.$there;
5
+$string = 'Hello'.$there;
4 6
 $string = 'Hello'.$there;
5
-$string = 'Hello'. $there;
6
-$string = 'Hello' .$there;
7 7
 
8 8
 $y = '1'
9 9
    . '2'
@@ -11,19 +11,19 @@  discard block
 block discarded – undo
11 11
 
12 12
 // @codingStandardsChangeSetting Squiz.Strings.ConcatenationSpacing spacing 1
13 13
 
14
-$string = 'Hello'.$there.'. How are'.$you.$going.   "today $okay";
15
-$string = 'Hello' . $there . '. How are' . $you . $going . "today $okay";
14
+$string = 'Hello'.$there.'. How are'.$you.$going."today $okay";
15
+$string = 'Hello'.$there.'. How are'.$you.$going."today $okay";
16
+$string = 'Hello'.$there;
17
+$string = 'Hello'.$there;
16 18
 $string = 'Hello'.$there;
17
-$string = 'Hello'. $there;
18
-$string = 'Hello' .$there;
19 19
 
20 20
 // @codingStandardsChangeSetting Squiz.Strings.ConcatenationSpacing ignoreNewlines true
21 21
 $y = '1'
22 22
    . '2'
23 23
    . '3';
24 24
 
25
-$y = '1' .
26
-     '2' .
25
+$y = '1'.
26
+     '2'.
27 27
      '3';
28 28
 
29 29
 $y = '1'
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php 3 patches
Switch Indentation   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -45,137 +45,137 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'ArrayDeclarationUnitTest.1.inc':
49
-            return array(
50
-                    7   => 2,
51
-                    9   => 2,
52
-                    22  => 1,
53
-                    23  => 1,
54
-                    24  => 1,
55
-                    25  => 1,
56
-                    31  => 1,
57
-                    35  => 1,
58
-                    36  => 1,
59
-                    41  => 1,
60
-                    46  => 1,
61
-                    47  => 1,
62
-                    50  => 1,
63
-                    51  => 1,
64
-                    53  => 1,
65
-                    56  => 1,
66
-                    58  => 1,
67
-                    61  => 1,
68
-                    62  => 1,
69
-                    63  => 1,
70
-                    64  => 1,
71
-                    65  => 1,
72
-                    66  => 3,
73
-                    70  => 1,
74
-                    76  => 2,
75
-                    77  => 1,
76
-                    78  => 7,
77
-                    79  => 2,
78
-                    81  => 2,
79
-                    82  => 4,
80
-                    87  => 1,
81
-                    88  => 1,
82
-                    92  => 1,
83
-                    97  => 1,
84
-                    100 => 1,
85
-                    101 => 1,
86
-                    102 => 1,
87
-                    105 => 1,
88
-                    106 => 1,
89
-                    107 => 1,
90
-                    125 => 1,
91
-                    126 => 1,
92
-                    141 => 1,
93
-                    144 => 1,
94
-                    146 => 1,
95
-                    148 => 1,
96
-                    151 => 1,
97
-                    157 => 1,
98
-                    174 => 3,
99
-                    179 => 1,
100
-                    182 => 1,
101
-                    188 => 1,
102
-                    207 => 1,
103
-                    212 => 1,
104
-                    214 => 1,
105
-                    218 => 2,
106
-                    219 => 2,
107
-                    223 => 1,
108
-                    255 => 1,
109
-                    294 => 1,
110
-                    295 => 1,
111
-                    296 => 1,
112
-                    311 => 1,
113
-                    317 => 1,
114
-                    339 => 2,
115
-                   );
116
-        case 'ArrayDeclarationUnitTest.2.inc':
117
-            return array(
118
-                    9   => 1,
119
-                    23  => 1,
120
-                    24  => 1,
121
-                    25  => 1,
122
-                    31  => 1,
123
-                    36  => 1,
124
-                    41  => 1,
125
-                    46  => 1,
126
-                    47  => 1,
127
-                    51  => 1,
128
-                    53  => 1,
129
-                    56  => 1,
130
-                    61  => 1,
131
-                    63  => 1,
132
-                    64  => 1,
133
-                    65  => 1,
134
-                    66  => 2,
135
-                    70  => 1,
136
-                    76  => 1,
137
-                    77  => 1,
138
-                    78  => 7,
139
-                    79  => 2,
140
-                    81  => 2,
141
-                    82  => 4,
142
-                    87  => 1,
143
-                    88  => 1,
144
-                    92 => 1,
145
-                    97  => 1,
146
-                    100 => 1,
147
-                    101 => 1,
148
-                    102 => 1,
149
-                    105 => 1,
150
-                    106 => 1,
151
-                    107 => 1,
152
-                    125 => 1,
153
-                    126 => 1,
154
-                    141 => 1,
155
-                    144 => 1,
156
-                    146 => 1,
157
-                    148 => 1,
158
-                    151 => 1,
159
-                    157 => 1,
160
-                    174 => 3,
161
-                    179 => 1,
162
-                    190 => 1,
163
-                    191 => 1,
164
-                    192 => 1,
165
-                    207 => 1,
166
-                    210 => 1,
167
-                    211 => 1,
168
-                    215 => 1,
169
-                    247 => 1,
170
-                    286 => 1,
171
-                    287 => 1,
172
-                    288 => 1,
173
-                    303 => 1,
174
-                    309 => 1,
175
-                    331 => 2,
176
-                   );
177
-        default:
178
-            return array();
48
+            case 'ArrayDeclarationUnitTest.1.inc':
49
+                return array(
50
+                        7   => 2,
51
+                        9   => 2,
52
+                        22  => 1,
53
+                        23  => 1,
54
+                        24  => 1,
55
+                        25  => 1,
56
+                        31  => 1,
57
+                        35  => 1,
58
+                        36  => 1,
59
+                        41  => 1,
60
+                        46  => 1,
61
+                        47  => 1,
62
+                        50  => 1,
63
+                        51  => 1,
64
+                        53  => 1,
65
+                        56  => 1,
66
+                        58  => 1,
67
+                        61  => 1,
68
+                        62  => 1,
69
+                        63  => 1,
70
+                        64  => 1,
71
+                        65  => 1,
72
+                        66  => 3,
73
+                        70  => 1,
74
+                        76  => 2,
75
+                        77  => 1,
76
+                        78  => 7,
77
+                        79  => 2,
78
+                        81  => 2,
79
+                        82  => 4,
80
+                        87  => 1,
81
+                        88  => 1,
82
+                        92  => 1,
83
+                        97  => 1,
84
+                        100 => 1,
85
+                        101 => 1,
86
+                        102 => 1,
87
+                        105 => 1,
88
+                        106 => 1,
89
+                        107 => 1,
90
+                        125 => 1,
91
+                        126 => 1,
92
+                        141 => 1,
93
+                        144 => 1,
94
+                        146 => 1,
95
+                        148 => 1,
96
+                        151 => 1,
97
+                        157 => 1,
98
+                        174 => 3,
99
+                        179 => 1,
100
+                        182 => 1,
101
+                        188 => 1,
102
+                        207 => 1,
103
+                        212 => 1,
104
+                        214 => 1,
105
+                        218 => 2,
106
+                        219 => 2,
107
+                        223 => 1,
108
+                        255 => 1,
109
+                        294 => 1,
110
+                        295 => 1,
111
+                        296 => 1,
112
+                        311 => 1,
113
+                        317 => 1,
114
+                        339 => 2,
115
+                       );
116
+            case 'ArrayDeclarationUnitTest.2.inc':
117
+                return array(
118
+                        9   => 1,
119
+                        23  => 1,
120
+                        24  => 1,
121
+                        25  => 1,
122
+                        31  => 1,
123
+                        36  => 1,
124
+                        41  => 1,
125
+                        46  => 1,
126
+                        47  => 1,
127
+                        51  => 1,
128
+                        53  => 1,
129
+                        56  => 1,
130
+                        61  => 1,
131
+                        63  => 1,
132
+                        64  => 1,
133
+                        65  => 1,
134
+                        66  => 2,
135
+                        70  => 1,
136
+                        76  => 1,
137
+                        77  => 1,
138
+                        78  => 7,
139
+                        79  => 2,
140
+                        81  => 2,
141
+                        82  => 4,
142
+                        87  => 1,
143
+                        88  => 1,
144
+                        92 => 1,
145
+                        97  => 1,
146
+                        100 => 1,
147
+                        101 => 1,
148
+                        102 => 1,
149
+                        105 => 1,
150
+                        106 => 1,
151
+                        107 => 1,
152
+                        125 => 1,
153
+                        126 => 1,
154
+                        141 => 1,
155
+                        144 => 1,
156
+                        146 => 1,
157
+                        148 => 1,
158
+                        151 => 1,
159
+                        157 => 1,
160
+                        174 => 3,
161
+                        179 => 1,
162
+                        190 => 1,
163
+                        191 => 1,
164
+                        192 => 1,
165
+                        207 => 1,
166
+                        210 => 1,
167
+                        211 => 1,
168
+                        215 => 1,
169
+                        247 => 1,
170
+                        286 => 1,
171
+                        287 => 1,
172
+                        288 => 1,
173
+                        303 => 1,
174
+                        309 => 1,
175
+                        331 => 2,
176
+                       );
177
+            default:
178
+                return array();
179 179
         }//end switch
180 180
 
181 181
     }//end getErrorList()
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.
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='')
43
+    public function getErrorList($testFile = '')
44 44
     {
45 45
         switch ($testFile) {
46 46
         case 'CharacterBeforePHPOpeningTagUnitTest.1.inc':
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 $myArray['key']                = $value;
3 3
 $myArray[/* key start */'key'] = $value;
4 4
 $myArray[/* key start */'key'/* key end */] = $value;
5
-$myArray  [  'key'  ]            = $value;
5
+$myArray  ['key'] = $value;
6 6
 if ($array[($index + 1)] === true) {
7
-} else if ($array  [ ($index + 1) ] === null) {
7
+} else if ($array  [($index + 1)] === null) {
8 8
 }
9 9
 $array = [
10 10
     'foo' => 'bar',
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc 2 patches
Indentation   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
     $c = Array(
10 10
             'a' => 1,
11
-         );
11
+            );
12 12
 }
13 13
 
14 14
 
@@ -17,58 +17,58 @@  discard block
 block discarded – undo
17 17
     public $good = array(
18 18
                     'width'  => '',
19 19
                     'height' => '',
20
-                   );
20
+                    );
21 21
 
22 22
     private $_bad = Array(
23 23
                     'width' => '',
24 24
                     'height' => ''
25
-                     );
25
+                        );
26 26
 
27 27
 
28 28
     public function test()
29 29
     {
30 30
         $truck = array(
31
-                 'width' => '',
32
-                  'height' => '',
33
-                 );
31
+                    'width' => '',
32
+                    'height' => '',
33
+                    );
34 34
 
35 35
         $plane = Array(
36 36
                 'width' => '',
37
-                  'height' => '',
38
-                 );
37
+                    'height' => '',
38
+                    );
39 39
 
40 40
         $car = array(
41 41
                 'width' => '',
42 42
                 'height' => '',
43
-               );
43
+                );
44 44
 
45 45
         $bus = array(
46 46
                 'width'  =>   '',
47 47
                 'height' => ''
48
-               );
48
+                );
49 49
 
50 50
         $train = array  (
51
-                   TRUE,
52
-                  FALSE,
53
-                  'aaa'
54
-                 );
51
+                    TRUE,
52
+                    FALSE,
53
+                    'aaa'
54
+                    );
55 55
 
56 56
         $inline = array('aaa', 'bbb', 'ccc');
57 57
         $inline = array('aaa');
58 58
         $inline = Array('aaa');
59 59
 
60 60
         $bigone = array(
61
-                   'name' => 'bigone',
62
-                   'children'   => Array(
61
+                    'name' => 'bigone',
62
+                    'children'   => Array(
63 63
                                     '1a' => 'child',
64 64
                                     '11b' => 'child',
65 65
                                     '111c'      => 'child',
66 66
                                     'children'  => Array(
67 67
                                                     'child' => 'aaa',
68
-                                                   ),
69
-                                   ),
70
-                   'short_name' => 'big'
71
-                  );
68
+                                                    ),
69
+                                    ),
70
+                    'short_name' => 'big'
71
+                    );
72 72
     }
73 73
 
74 74
 }//end class
@@ -83,91 +83,91 @@  discard block
 block discarded – undo
83 83
 }
84 84
 
85 85
 $value = array(
86
-          '1'=> TRUE,
87
-          FALSE,
88
-          '3' => 'aaa',);
86
+            '1'=> TRUE,
87
+            FALSE,
88
+            '3' => 'aaa',);
89 89
 
90 90
 $value = array(
91
-          '1'=> TRUE,
92
-          FALSE,
93
-         );
91
+            '1'=> TRUE,
92
+            FALSE,
93
+            );
94 94
 
95 95
 $value = array(
96
-          TRUE,
97
-          '1' => FALSE,
98
-         );
96
+            TRUE,
97
+            '1' => FALSE,
98
+            );
99 99
 
100 100
 $value = array(1,
101
-          2 ,
102
-          3 ,
103
-         );
101
+            2 ,
102
+            3 ,
103
+            );
104 104
 
105 105
 $value = array(1 => $one,
106
-          2 => $two ,
107
-          3 => $three ,
108
-         );
106
+            2 => $two ,
107
+            3 => $three ,
108
+            );
109 109
 
110 110
 $value = array(
111
-          'tag'   => $tag,
112
-          'space' => $this->_getIndentation($tag, $tagElement),
113
-         );
111
+            'tag'   => $tag,
112
+            'space' => $this->_getIndentation($tag, $tagElement),
113
+            );
114 114
 
115 115
 $expected = array(
116
-             array(
117
-              '1' => 1,
118
-              '1' => 2,
119
-             ),
116
+                array(
117
+                '1' => 1,
118
+                '1' => 2,
119
+                ),
120 120
             );
121 121
 
122 122
 $expected = array(
123
-             array(
124
-              '1' => 1,
125
-              '1' => 2
126
-             )
123
+                array(
124
+                '1' => 1,
125
+                '1' => 2
126
+                )
127 127
             );
128 128
 
129 129
 // Space in second arg.
130 130
 $args = array(
131
-         '"'.$this->id.'"',
132
-         (int) $hasSessions,
131
+            '"'.$this->id.'"',
132
+            (int) $hasSessions,
133 133
         );
134 134
 
135 135
 // No errors.
136 136
 $paths = array(
137
-          Init::ROOT_DIR.'/Systems'   => 'Systems',
138
-          Init::ROOT_DIR.'/Installer' => 'Systems',
139
-         );
137
+            Init::ROOT_DIR.'/Systems'   => 'Systems',
138
+            Init::ROOT_DIR.'/Installer' => 'Systems',
139
+            );
140 140
 
141 141
 $x = array(
142
-     );
142
+        );
143 143
 
144 144
 $x = array('test'
145
-     );
145
+        );
146 146
 $x = array('test',
147
-     );
147
+        );
148 148
 $x = array('name' => 'test',
149
-     );
149
+        );
150 150
 
151 151
 $x = array(
152
-      $x,
153
-     );
152
+        $x,
153
+        );
154 154
 
155 155
 $func = array(
156
-         $x,
157
-         'get'.$x.'Replacement'
156
+            $x,
157
+            'get'.$x.'Replacement'
158 158
         );
159 159
 
160 160
 $array = array(
161
-          'input_one' => 'one',
162
-          'inputTwo'  => 'two',
163
-          'input_3'   => 3,
164
-         );
161
+            'input_one' => 'one',
162
+            'inputTwo'  => 'two',
163
+            'input_3'   => 3,
164
+            );
165 165
 
166 166
 $array = array(
167
-          'input_one',
168
-          'inputTwo',
169
-          'input_3',
170
-         );
167
+            'input_one',
168
+            'inputTwo',
169
+            'input_3',
170
+            );
171 171
 
172 172
 // Malformed
173 173
 $foo = array(1
@@ -176,32 +176,32 @@  discard block
 block discarded – undo
176 176
 $listItems[$aliasPath] = array('itemContent' => implode('<br/>', $aliases));
177 177
 
178 178
 $listItems[$aliasPath] = array(
179
-                          'itemContent' => implode('<br/>', $aliases)
180
-                         );
179
+                            'itemContent' => implode('<br/>', $aliases)
180
+                            );
181 181
 
182 182
 $x = array
183
-  (
184
-      $x,
185
-      $y,
186
-     );
183
+    (
184
+        $x,
185
+        $y,
186
+        );
187 187
 
188 188
 $x = array
189 189
 (
190
-      $x,
191
-      $y,
192
-     );
190
+        $x,
191
+        $y,
192
+        );
193 193
 
194 194
 $x = array(
195 195
 
196
-      $x,
197
-      $y,
198
-     );
196
+        $x,
197
+        $y,
198
+        );
199 199
 
200 200
 $test = array(
201
-         'test' => TestFunction::blah(
202
-             $value1,
203
-             $value2
204
-         ),
201
+            'test' => TestFunction::blah(
202
+                $value1,
203
+                $value2
204
+            ),
205 205
         );
206 206
 
207 207
 $c = array('a' => 1,);
@@ -224,71 +224,71 @@  discard block
 block discarded – undo
224 224
 }
225 225
 
226 226
 $array = array(
227
-          'name'       => 'contactSubject',
228
-          'required'   => TRUE,
229
-          'validators' => array(
230
-                           new \Zend\Validator\InArray(array('haystack' => array_keys($aSubjects))),
231
-                          ),
232
-         );
227
+            'name'       => 'contactSubject',
228
+            'required'   => TRUE,
229
+            'validators' => array(
230
+                            new \Zend\Validator\InArray(array('haystack' => array_keys($aSubjects))),
231
+                            ),
232
+            );
233 233
 
234 234
 $var = array(
235 235
         'ViewHelper',
236 236
         array('Foo'),
237 237
         'Errors',
238
-       );
238
+        );
239 239
 
240 240
 $data = array(
241
-         'first',
242
-         'second',
243
-         'third',
244
-         // Add more here
241
+            'first',
242
+            'second',
243
+            'third',
244
+            // Add more here
245 245
         );
246 246
 
247 247
 $data = array(
248
-         'first',
249
-         'second',
250
-         //'third',
248
+            'first',
249
+            'second',
250
+            //'third',
251 251
         );
252 252
 
253 253
 $data = array(
254
-         'first',
255
-         'second'
256
-         //'third',
254
+            'first',
255
+            'second'
256
+            //'third',
257 257
         );
258 258
 
259 259
 $foo = array(
260 260
         $this->getViewName() . '.id'    => 'value',
261 261
         $this->getViewName() . '.title' => 'value',
262
-       );
262
+        );
263 263
 
264 264
 $foo = array(
265 265
         $this->getViewName() . '.id',
266 266
         $this->getViewName() . '.title',
267
-       );
267
+        );
268 268
 
269 269
 $weightings = array(
270
-               T_CLOSURE             => 100,
270
+                T_CLOSURE             => 100,
271 271
 
272
-               /*
272
+                /*
273 273
                    Conditions.
274 274
                */
275 275
 
276
-               T_WHILE               => 50,
276
+                T_WHILE               => 50,
277 277
 
278
-               /*
278
+                /*
279 279
                    Operators and arithmetic.
280 280
                */
281 281
 
282
-               T_BITWISE_AND         => 8,
282
+                T_BITWISE_AND         => 8,
283 283
 
284
-               T_BOOLEAN_AND         => 5,
284
+                T_BOOLEAN_AND         => 5,
285 285
 
286
-               /*
286
+                /*
287 287
                    Equality.
288 288
                */
289 289
 
290
-               T_IS_GREATER_OR_EQUAL => 5,
291
-              );
290
+                T_IS_GREATER_OR_EQUAL => 5,
291
+                );
292 292
 
293 293
 foreach (array(
294 294
         'foo'    => 'bar',
@@ -299,25 +299,25 @@  discard block
 block discarded – undo
299 299
 $ids = array(
300 300
         '1', // Foo.
301 301
         '13', // Bar.
302
-       );
302
+        );
303 303
 
304 304
 array(
305
- 'key1' => function($bar) {
305
+    'key1' => function($bar) {
306 306
     return $bar;
307
- },
308
- 'key2' => function($foo) {
307
+    },
308
+    'key2' => function($foo) {
309 309
     return $foo;
310
- },
311
- 'key3' => function($bar) {
310
+    },
311
+    'key3' => function($bar) {
312 312
     return $bar;
313
- }
313
+    }
314 314
 );
315 315
 
316 316
 array(
317
- 'key1' => array(
317
+    'key1' => array(
318 318
             '1',
319 319
             '2',
320
-           )
320
+            )
321 321
 );
322 322
 
323 323
 $var = array(
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         <div id="%s">
328 328
             %s
329 329
         </div>',
330
-       );
330
+        );
331 331
 
332 332
 function test() : array
333 333
 {
@@ -335,5 +335,5 @@  discard block
 block discarded – undo
335 335
 }
336 336
 
337 337
 $fields = array(
338
-           'id'    => array('type' => 'INT'),
339
-           'value' => array('type' => 'VARCHAR'));
338
+            'id'    => array('type' => 'INT'),
339
+            'value' => array('type' => 'VARCHAR'));
Please login to merge, or discard this patch.
Spacing   +17 added lines, -19 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 {
5 5
     $a = array();
6 6
 
7
-    $b = Array ();
7
+    $b = Array();
8 8
 
9 9
     $c = Array(
10 10
             'a' => 1,
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 'height' => ''
48 48
                );
49 49
 
50
-        $train = array  (
50
+        $train = array(
51 51
                    TRUE,
52 52
                   FALSE,
53 53
                   'aaa'
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
 
74 74
 }//end class
75 75
 
76
-$value = array ( );
76
+$value = array( );
77 77
 $value = array(  );
78 78
 $value = array('1'=>$one, '2'  =>  $two, '3'=> $three, '4' =>$four);
79 79
 $value = array('1'=>$one);
80 80
 
81
-if (in_array('1', array('1','2','3')) === TRUE) {
82
-    $value = in_array('1', array('1'  ,   '2',     '3','4'));
81
+if (in_array('1', array('1', '2', '3')) === TRUE) {
82
+    $value = in_array('1', array('1', '2', '3', '4'));
83 83
 }
84 84
 
85 85
 $value = array(
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
          );
99 99
 
100 100
 $value = array(1,
101
-          2 ,
102
-          3 ,
101
+          2,
102
+          3,
103 103
          );
104 104
 
105 105
 $value = array(1 => $one,
106
-          2 => $two ,
107
-          3 => $three ,
106
+          2 => $two,
107
+          3 => $three,
108 108
          );
109 109
 
110 110
 $value = array(
@@ -179,14 +179,12 @@  discard block
 block discarded – undo
179 179
                           'itemContent' => implode('<br/>', $aliases)
180 180
                          );
181 181
 
182
-$x = array
183
-  (
182
+$x = array(
184 183
       $x,
185 184
       $y,
186 185
      );
187 186
 
188
-$x = array
189
-(
187
+$x = array(
190 188
       $x,
191 189
       $y,
192 190
      );
@@ -215,8 +213,8 @@  discard block
 block discarded – undo
215 213
 
216 214
 }
217 215
 
218
-$foo = Array('[',']',':',"\n","\r");
219
-$bar = Array('&#91;','&#93;','&#58;','&#10;','&#13;');
216
+$foo = Array('[', ']', ':', "\n", "\r");
217
+$bar = Array('&#91;', '&#93;', '&#58;', '&#10;', '&#13;');
220 218
 
221 219
 function foo()
222 220
 {
@@ -257,13 +255,13 @@  discard block
 block discarded – undo
257 255
         );
258 256
 
259 257
 $foo = array(
260
-        $this->getViewName() . '.id'    => 'value',
261
-        $this->getViewName() . '.title' => 'value',
258
+        $this->getViewName().'.id'    => 'value',
259
+        $this->getViewName().'.title' => 'value',
262 260
        );
263 261
 
264 262
 $foo = array(
265
-        $this->getViewName() . '.id',
266
-        $this->getViewName() . '.title',
263
+        $this->getViewName().'.id',
264
+        $this->getViewName().'.title',
267 265
        );
268 266
 
269 267
 $weightings = array(
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc 2 patches
Indentation   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
     $c = [
10 10
             'a' => 1,
11
-         ];
11
+            ];
12 12
 }
13 13
 
14 14
 
@@ -17,58 +17,58 @@  discard block
 block discarded – undo
17 17
     public $good = [
18 18
                     'width'  => '',
19 19
                     'height' => '',
20
-                   ];
20
+                    ];
21 21
 
22 22
     private $_bad = [
23 23
                     'width' => '',
24 24
                     'height' => ''
25
-                     ];
25
+                        ];
26 26
 
27 27
 
28 28
     public function test()
29 29
     {
30 30
         $truck = [
31
-                 'width' => '',
32
-                  'height' => '',
33
-                 ];
31
+                    'width' => '',
32
+                    'height' => '',
33
+                    ];
34 34
 
35 35
         $plane = [
36 36
                 'width' => '',
37
-                  'height' => '',
38
-                 ];
37
+                    'height' => '',
38
+                    ];
39 39
 
40 40
         $car = [
41 41
                 'width' => '',
42 42
                 'height' => '',
43
-               ];
43
+                ];
44 44
 
45 45
         $bus = [
46 46
                 'width'  =>   '',
47 47
                 'height' => ''
48
-               ];
48
+                ];
49 49
 
50 50
         $train = [
51
-                   TRUE,
52
-                  FALSE,
53
-                  'aaa'
54
-                 ];
51
+                    TRUE,
52
+                    FALSE,
53
+                    'aaa'
54
+                    ];
55 55
 
56 56
         $inline = ['aaa', 'bbb', 'ccc'];
57 57
         $inline = ['aaa'];
58 58
         $inline = ['aaa'];
59 59
 
60 60
         $bigone = [
61
-                   'name' => 'bigone',
62
-                   'children'   => [
61
+                    'name' => 'bigone',
62
+                    'children'   => [
63 63
                                     '1a' => 'child',
64 64
                                     '11b' => 'child',
65 65
                                     '111c'      => 'child',
66 66
                                     'children'  => [
67 67
                                                     'child' => 'aaa',
68
-                                                   ],
69
-                                   ],
70
-                   'short_name' => 'big'
71
-                  ];
68
+                                                    ],
69
+                                    ],
70
+                    'short_name' => 'big'
71
+                    ];
72 72
     }
73 73
 
74 74
 }//end class
@@ -83,91 +83,91 @@  discard block
 block discarded – undo
83 83
 }
84 84
 
85 85
 $value = [
86
-          '1'=> TRUE,
87
-          FALSE,
88
-          '3' => 'aaa',];
86
+            '1'=> TRUE,
87
+            FALSE,
88
+            '3' => 'aaa',];
89 89
 
90 90
 $value = [
91
-          '1'=> TRUE,
92
-          FALSE,
93
-         ];
91
+            '1'=> TRUE,
92
+            FALSE,
93
+            ];
94 94
 
95 95
 $value = [
96
-          TRUE,
97
-          '1' => FALSE,
98
-         ];
96
+            TRUE,
97
+            '1' => FALSE,
98
+            ];
99 99
 
100 100
 $value = [1,
101
-          2 ,
102
-          3 ,
103
-         ];
101
+            2 ,
102
+            3 ,
103
+            ];
104 104
 
105 105
 $value = [1 => $one,
106
-          2 => $two ,
107
-          3 => $three ,
108
-         ];
106
+            2 => $two ,
107
+            3 => $three ,
108
+            ];
109 109
 
110 110
 $value = [
111
-          'tag'   => $tag,
112
-          'space' => $this->_getIndentation($tag, $tagElement),
113
-         ];
111
+            'tag'   => $tag,
112
+            'space' => $this->_getIndentation($tag, $tagElement),
113
+            ];
114 114
 
115 115
 $expected = [
116
-             [
117
-              '1' => 1,
118
-              '1' => 2,
119
-             ],
116
+                [
117
+                '1' => 1,
118
+                '1' => 2,
119
+                ],
120 120
             ];
121 121
 
122 122
 $expected = [
123
-             [
124
-              '1' => 1,
125
-              '1' => 2
126
-             ]
123
+                [
124
+                '1' => 1,
125
+                '1' => 2
126
+                ]
127 127
             ];
128 128
 
129 129
 // Space in second arg.
130 130
 $args = [
131
-         '"'.$this->id.'"',
132
-         (int) $hasSessions,
131
+            '"'.$this->id.'"',
132
+            (int) $hasSessions,
133 133
         ];
134 134
 
135 135
 // No errors.
136 136
 $paths = [
137
-          Init::ROOT_DIR.'/Systems'   => 'Systems',
138
-          Init::ROOT_DIR.'/Installer' => 'Systems',
139
-         ];
137
+            Init::ROOT_DIR.'/Systems'   => 'Systems',
138
+            Init::ROOT_DIR.'/Installer' => 'Systems',
139
+            ];
140 140
 
141 141
 $x = [
142
-     ];
142
+        ];
143 143
 
144 144
 $x = ['test'
145
-     ];
145
+        ];
146 146
 $x = ['test',
147
-     ];
147
+        ];
148 148
 $x = ['name' => 'test',
149
-     ];
149
+        ];
150 150
 
151 151
 $x = [
152
-      $x,
153
-     ];
152
+        $x,
153
+        ];
154 154
 
155 155
 $func = [
156
-         $x,
157
-         'get'.$x.'Replacement'
156
+            $x,
157
+            'get'.$x.'Replacement'
158 158
         ];
159 159
 
160 160
 $array = [
161
-          'input_one' => 'one',
162
-          'inputTwo'  => 'two',
163
-          'input_3'   => 3,
164
-         ];
161
+            'input_one' => 'one',
162
+            'inputTwo'  => 'two',
163
+            'input_3'   => 3,
164
+            ];
165 165
 
166 166
 $array = [
167
-          'input_one',
168
-          'inputTwo',
169
-          'input_3',
170
-         ];
167
+            'input_one',
168
+            'inputTwo',
169
+            'input_3',
170
+            ];
171 171
 
172 172
 // Malformed
173 173
 $foo = [1
@@ -176,32 +176,32 @@  discard block
 block discarded – undo
176 176
 $listItems[$aliasPath] = ['itemContent' => implode('<br/>', $aliases)];
177 177
 
178 178
 $listItems[$aliasPath] = [
179
-                          'itemContent' => implode('<br/>', $aliases)
180
-                         ];
179
+                            'itemContent' => implode('<br/>', $aliases)
180
+                            ];
181 181
 
182 182
 $x = 
183
-     [
184
-      $x,
185
-      $y,
186
-     ];
183
+        [
184
+        $x,
185
+        $y,
186
+        ];
187 187
 
188 188
 $x =
189 189
 [
190
-      $x,
191
-      $y,
192
-     ];
190
+        $x,
191
+        $y,
192
+        ];
193 193
 
194 194
 $x = [
195 195
 
196
-      $x,
197
-      $y,
198
-     ];
196
+        $x,
197
+        $y,
198
+        ];
199 199
 
200 200
 $test = [
201
-         'test' => TestFunction::blah(
202
-             $value1,
203
-             $value2
204
-         ),
201
+            'test' => TestFunction::blah(
202
+                $value1,
203
+                $value2
204
+            ),
205 205
         ];
206 206
 
207 207
 $c = ['a' => 1,];
@@ -216,71 +216,71 @@  discard block
 block discarded – undo
216 216
 }
217 217
 
218 218
 $array = [
219
-          'name'       => 'contactSubject',
220
-          'required'   => TRUE,
221
-          'validators' => [
222
-                           new \Zend\Validator\InArray(['haystack' => array_keys($aSubjects)]),
223
-                          ],
224
-         ];
219
+            'name'       => 'contactSubject',
220
+            'required'   => TRUE,
221
+            'validators' => [
222
+                            new \Zend\Validator\InArray(['haystack' => array_keys($aSubjects)]),
223
+                            ],
224
+            ];
225 225
 
226 226
 $var = [
227 227
         'ViewHelper',
228 228
         ['Foo'],
229 229
         'Errors',
230
-       ];
230
+        ];
231 231
 
232 232
 $data = [
233
-         'first',
234
-         'second',
235
-         'third',
236
-         // Add more here
233
+            'first',
234
+            'second',
235
+            'third',
236
+            // Add more here
237 237
         ];
238 238
 
239 239
 $data = [
240
-         'first',
241
-         'second',
242
-         //'third',
240
+            'first',
241
+            'second',
242
+            //'third',
243 243
         ];
244 244
 
245 245
 $data = [
246
-         'first',
247
-         'second'
248
-         //'third',
246
+            'first',
247
+            'second'
248
+            //'third',
249 249
         ];
250 250
 
251 251
 $foo = [
252 252
         $this->getViewName() . '.id'    => 'value',
253 253
         $this->getViewName() . '.title' => 'value',
254
-       ];
254
+        ];
255 255
 
256 256
 $foo = [
257 257
         $this->getViewName() . '.id',
258 258
         $this->getViewName() . '.title',
259
-       ];
259
+        ];
260 260
 
261 261
 $weightings = [
262
-               T_CLOSURE             => 100,
262
+                T_CLOSURE             => 100,
263 263
 
264
-               /*
264
+                /*
265 265
                    Conditions.
266 266
                */
267 267
 
268
-               T_WHILE               => 50,
268
+                T_WHILE               => 50,
269 269
 
270
-               /*
270
+                /*
271 271
                    Operators and arithmetic.
272 272
                */
273 273
 
274
-               T_BITWISE_AND         => 8,
274
+                T_BITWISE_AND         => 8,
275 275
 
276
-               T_BOOLEAN_AND         => 5,
276
+                T_BOOLEAN_AND         => 5,
277 277
 
278
-               /*
278
+                /*
279 279
                    Equality.
280 280
                */
281 281
 
282
-               T_IS_GREATER_OR_EQUAL => 5,
283
-              ];
282
+                T_IS_GREATER_OR_EQUAL => 5,
283
+                ];
284 284
 
285 285
 foreach ([
286 286
         'foo'    => 'bar',
@@ -291,25 +291,25 @@  discard block
 block discarded – undo
291 291
 $ids = [
292 292
         '1', // Foo.
293 293
         '13', // Bar.
294
-       ];
294
+        ];
295 295
 
296 296
 [
297
- 'key1' => function($bar) {
297
+    'key1' => function($bar) {
298 298
     return $bar;
299
- },
300
- 'key2' => function($foo) {
299
+    },
300
+    'key2' => function($foo) {
301 301
     return $foo;
302
- },
303
- 'key3' => function($bar) {
302
+    },
303
+    'key3' => function($bar) {
304 304
     return $bar;
305
- }
305
+    }
306 306
 ];
307 307
 
308 308
 [
309
- 'key1' => [
309
+    'key1' => [
310 310
             '1',
311 311
             '2',
312
-           ]
312
+            ]
313 313
 ];
314 314
 
315 315
 $var = [
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
         <div id="%s">
320 320
             %s
321 321
         </div>',
322
-       ];
322
+        ];
323 323
 
324 324
 function test() : array
325 325
 {
@@ -327,5 +327,5 @@  discard block
 block discarded – undo
327 327
 }
328 328
 
329 329
 $fields = [
330
-           'id'    => ['type' => 'INT'],
331
-           'value' => ['type' => 'VARCHAR']];
330
+            'id'    => ['type' => 'INT'],
331
+            'value' => ['type' => 'VARCHAR']];
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -73,19 +73,19 @@  discard block
 block discarded – undo
73 73
 
74 74
 }//end class
75 75
 
76
-$value = [ ];
77
-$value = [  ];
76
+$value = [];
77
+$value = [];
78 78
 $value = ['1'=>$one, '2'  =>  $two, '3'=> $three, '4' =>$four];
79 79
 $value = ['1'=>$one];
80 80
 
81
-if (in_array('1', ['1','2','3']) === TRUE) {
82
-    $value = in_array('1', ['1'  ,   '2',     '3','4']);
81
+if (in_array('1', ['1', '2', '3']) === TRUE) {
82
+    $value = in_array('1', ['1', '2', '3', '4']);
83 83
 }
84 84
 
85 85
 $value = [
86 86
           '1'=> TRUE,
87 87
           FALSE,
88
-          '3' => 'aaa',];
88
+          '3' => 'aaa', ];
89 89
 
90 90
 $value = [
91 91
           '1'=> TRUE,
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
          ];
99 99
 
100 100
 $value = [1,
101
-          2 ,
102
-          3 ,
101
+          2,
102
+          3,
103 103
          ];
104 104
 
105 105
 $value = [1 => $one,
106
-          2 => $two ,
107
-          3 => $three ,
106
+          2 => $two,
107
+          3 => $three,
108 108
          ];
109 109
 
110 110
 $value = [
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
          ),
205 205
         ];
206 206
 
207
-$c = ['a' => 1,];
208
-$c->{$var}[ ] = 2;
207
+$c = ['a' => 1, ];
208
+$c->{$var}[] = 2;
209 209
 
210
-$foo = ['[',']',':',"\n","\r"];
211
-$bar = ['&#91;','&#93;','&#58;','&#10;','&#13;'];
210
+$foo = ['[', ']', ':', "\n", "\r"];
211
+$bar = ['&#91;', '&#93;', '&#58;', '&#10;', '&#13;'];
212 212
 
213 213
 function foo()
214 214
 {
@@ -249,13 +249,13 @@  discard block
 block discarded – undo
249 249
         ];
250 250
 
251 251
 $foo = [
252
-        $this->getViewName() . '.id'    => 'value',
253
-        $this->getViewName() . '.title' => 'value',
252
+        $this->getViewName().'.id'    => 'value',
253
+        $this->getViewName().'.title' => 'value',
254 254
        ];
255 255
 
256 256
 $foo = [
257
-        $this->getViewName() . '.id',
258
-        $this->getViewName() . '.title',
257
+        $this->getViewName().'.id',
258
+        $this->getViewName().'.title',
259 259
        ];
260 260
 
261 261
 $weightings = [
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php 3 patches
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'FileExtensionUnitTest.1.inc':
49
-            return array(
50
-                    1 => 1,
51
-                   );
52
-        default:
53
-            return array();
48
+            case 'FileExtensionUnitTest.1.inc':
49
+                return array(
50
+                        1 => 1,
51
+                       );
52
+            default:
53
+                return array();
54 54
         }
55 55
 
56 56
     }//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   +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='')
43
+    public function getErrorList($testFile = '')
44 44
     {
45 45
         switch ($testFile) {
46 46
         case 'CharacterBeforePHPOpeningTagUnitTest.1.inc':
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -123,13 +123,13 @@
 block discarded – undo
123 123
 }
124 124
 
125 125
 $expectedPermission = array(
126
-                       'granted'        => 4,
127
-                       'denied'         => 1,
128
-                       'cascade'        => TRUE,
129
-                       'blockergranted' => 2,
130
-                       'blockerdenied'  => - 3,
131
-                       'effective'      => TRUE,
132
-                      );
126
+                        'granted'        => 4,
127
+                        'denied'         => 1,
128
+                        'cascade'        => TRUE,
129
+                        'blockergranted' => 2,
130
+                        'blockerdenied'  => - 3,
131
+                        'effective'      => TRUE,
132
+                        );
133 133
 
134 134
 $value = (int) isset($blah) + 2;
135 135
 $value = (int) isset($blah) + (int) isset($foo) + (int) isset($bar);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 $line  = substr($line, 0, -2);
62 62
 $words = preg_split('|(\s+)|', $line."\n", -1, $flags);
63
-if (!isset($this->words[$wordPos-1]) || $this->words[$wordPos-1] !== ' ') {
63
+if (!isset($this->words[$wordPos - 1]) || $this->words[$wordPos - 1] !== ' ') {
64 64
 } else if ($this->tokens[$pos + 1] === "\n") {
65 65
 }
66 66
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                        'denied'         => 1,
128 128
                        'cascade'        => TRUE,
129 129
                        'blockergranted' => 2,
130
-                       'blockerdenied'  => - 3,
130
+                       'blockerdenied'  => -3,
131 131
                        'effective'      => TRUE,
132 132
                       );
133 133
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,8 +105,12 @@
 block discarded – undo
105 105
 
106 106
 }//end class
107 107
 
108
-if ($index < -1) $index = 0;
109
-if ($index < - 1) $index = 0;
108
+if ($index < -1) {
109
+    $index = 0;
110
+}
111
+if ($index < - 1) {
112
+    $index = 0;
113
+}
110 114
 
111 115
 $three = ceil($one / $two);
112 116
 $three = ceil(($one / $two) / $four);
Please login to merge, or discard this patch.