Completed
Branch master (d87ed9)
by Tomáš
07:16
created
Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -45,27 +45,27 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='ControlSignatureUnitTest.inc')
46 46
     {
47 47
         $errors = array(
48
-                   7   => 1,
49
-                   12  => 1,
50
-                   15  => 1,
51
-                   18  => 1,
52
-                   20  => 1,
53
-                   22  => 2,
54
-                   28  => 2,
55
-                   32  => 1,
56
-                   38  => 2,
57
-                   42  => 1,
58
-                   48  => 2,
59
-                   52  => 1,
60
-                   62  => 2,
61
-                   66  => 2,
62
-                   76  => 4,
63
-                   80  => 2,
64
-                   94  => 1,
65
-                   99  => 1,
66
-                   108 => 1,
67
-                   112 => 1,
68
-                  );
48
+                    7   => 1,
49
+                    12  => 1,
50
+                    15  => 1,
51
+                    18  => 1,
52
+                    20  => 1,
53
+                    22  => 2,
54
+                    28  => 2,
55
+                    32  => 1,
56
+                    38  => 2,
57
+                    42  => 1,
58
+                    48  => 2,
59
+                    52  => 1,
60
+                    62  => 2,
61
+                    66  => 2,
62
+                    76  => 4,
63
+                    80  => 2,
64
+                    94  => 1,
65
+                    99  => 1,
66
+                    108 => 1,
67
+                    112 => 1,
68
+                    );
69 69
 
70 70
         if ($testFile === 'ControlSignatureUnitTest.inc') {
71 71
             $errors[122] = 1;
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='ControlSignatureUnitTest.inc')
45
+    public function getErrorList($testFile = 'ControlSignatureUnitTest.inc')
46 46
     {
47 47
         $errors = array(
48 48
                    7   => 1,
Please login to merge, or discard this patch.
Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc 3 patches
Switch Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,8 +157,8 @@
 block discarded – undo
157 157
 
158 158
 switch($foo) {
159 159
 
160
-    case 'bar':
161
-    break;
160
+        case 'bar':
161
+        break;
162 162
 
163 163
 }
164 164
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
 
18 18
 do { echo $i; } while ($i > 0);
19 19
 
20
-do{
20
+do {
21 21
     echo $i;
22
-}while($i > 0);
22
+} while ($i > 0);
23 23
 
24 24
 while ($i < 1) {
25 25
     echo $i;
26 26
 }
27 27
 
28
-while($i < 1){
28
+while ($i < 1) {
29 29
     echo $i;
30 30
 }
31 31
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     echo $i;
36 36
 }
37 37
 
38
-for($i = 1; $i < 1; $i++){
38
+for ($i = 1; $i < 1; $i++) {
39 39
     echo $i;
40 40
 }
41 41
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     $i = 1;
46 46
 }
47 47
 
48
-if($i == 0){
48
+if ($i == 0) {
49 49
     $i = 1;
50 50
 }
51 51
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 if ($i == 0) {
61 61
     $i = 1;
62
-}else{
62
+} else {
63 63
     $i = 0;
64 64
 }
65 65
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 if ($i == 0) {
75 75
     $i = 1;
76
-}else   if($i == 2){
76
+} else   if ($i == 2) {
77 77
     $i = 0;
78 78
 }
79 79
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     echo $item;
128 128
 }
129 129
 
130
-foreach($items as $item){
130
+foreach ($items as $item) {
131 131
     echo $item;
132 132
 }
133 133
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     // catch body
156 156
 }
157 157
 
158
-switch($foo) {
158
+switch ($foo) {
159 159
 
160 160
     case 'bar':
161 161
     break;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
 ?>
169 169
 
170
-<?php while($row = $data->getRow()): ?>
170
+<?php while ($row = $data->getRow()): ?>
171 171
     <p><?= $val ?></p>
172 172
 <?php endwhile; ?>
173 173
 
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
 }
184 184
 
185 185
 ?>
186
-<?php foreach($formset['Fieldset'] as $fieldset): ?>
187
-    <?php foreach($fieldset['Field'] as $field): ?> 
186
+<?php foreach ($formset['Fieldset'] as $fieldset): ?>
187
+    <?php foreach ($fieldset['Field'] as $field): ?> 
188 188
     <?php endforeach; ?>
189 189
 <?php endforeach; ?>
190 190
 
Please login to merge, or discard this patch.
Braces   +14 added lines, -11 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 if ($i == 0) {
61 61
     $i = 1;
62
-}else{
62
+} else{
63 63
     $i = 0;
64 64
 }
65 65
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 if ($i == 0) {
75 75
     $i = 1;
76
-}else   if($i == 2){
76
+} else   if($i == 2){
77 77
     $i = 0;
78 78
 }
79 79
 
@@ -96,11 +96,13 @@  discard block
 block discarded – undo
96 96
     $i = 1;
97 97
 }
98 98
 
99
-if ($i == 0) /* this is ok */ {
99
+if ($i == 0) {
100
+    /* this is ok */ {
100 101
 }
101 102
 
102 103
 try {
103 104
     $code = 'this';
105
+}
104 106
 } catch (Exception $e) {
105 107
     // Caught!
106 108
 }
@@ -119,8 +121,7 @@  discard block
 block discarded – undo
119 121
 
120 122
 if ($a) {
121 123
 
122
-}
123
-elseif ($b) {
124
+} elseif ($b) {
124 125
 }
125 126
 
126 127
 foreach ($items as $item) {
@@ -131,27 +132,29 @@  discard block
 block discarded – undo
131 132
     echo $item;
132 133
 }
133 134
 
134
-if ($a && $b) // && $c)
135
+if ($a && $b) {
136
+    // && $c)
135 137
 {
136 138
 }
137 139
 
138 140
 if ($a == 5) :
139 141
     echo "a equals 5";
142
+}
140 143
     echo "...";
141 144
 elseif ($a == 6) :
142 145
     echo "a equals 6";
143 146
     echo "!!!";
144
-else :
147
+else {
148
+    :
145 149
     echo "a is neither 5 nor 6";
150
+}
146 151
 endif;
147 152
 
148 153
 try {
149 154
     // try body
150
-}
151
-catch (FirstExceptionType $e) {
155
+} catch (FirstExceptionType $e) {
152 156
     // catch body
153
-}
154
-catch (OtherExceptionType $e) {
157
+} catch (OtherExceptionType $e) {
155 158
     // catch body
156 159
 }
157 160
 
Please login to merge, or discard this patch.
Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         return array(
46 46
                 8  => 1,
47 47
                 13 => 1,
48
-               );
48
+                );
49 49
 
50 50
     }//end getErrorList()
51 51
 
Please login to merge, or discard this patch.
Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 // @codingStandardsChangeSetting Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesBeforeClose 0
31 31
 
32 32
 foreach ([
33
-          'foo'    => 'bar',
34
-          'foobaz' => 'bazzy',
35
-         ] as $key => $value) {
33
+            'foo'    => 'bar',
34
+            'foobaz' => 'bazzy',
35
+            ] as $key => $value) {
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 }
6 6
 
7 7
 // Invalid.
8
-foreach ( $something as $blah => $that ) {
8
+foreach ($something as $blah => $that) {
9 9
 }
10 10
 
11 11
 foreach ($something   as   $blah => $that) {
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 }
19 19
 
20 20
 // The works.
21
-foreach (  $something   aS   $blah    =>   $that   ) {
21
+foreach ($something   aS   $blah    =>   $that) {
22 22
 }
23 23
 
24 24
 // @codingStandardsChangeSetting Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesAfterOpen 1
25 25
 // @codingStandardsChangeSetting Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesBeforeClose 1
26 26
 foreach ($something as $blah => $that) {}
27
-foreach ( $something as $blah => $that ) {}
28
-foreach (  $something as $blah => $that  ) {}
27
+foreach ($something as $blah => $that) {}
28
+foreach ($something as $blah => $that) {}
29 29
 // @codingStandardsChangeSetting Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesAfterOpen 0
30 30
 // @codingStandardsChangeSetting Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesBeforeClose 0
31 31
 
Please login to merge, or discard this patch.
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/ConcatenationSpacingUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
                 18 => 1,
55 55
                 34 => 2,
56 56
                 36 => 1,
57
-               );
57
+                );
58 58
 
59 59
     }//end getErrorList()
60 60
 
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/Strings/DoubleQuoteUsageUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
                 21 => 1,
55 55
                 28 => 1,
56 56
                 29 => 1,
57
-               );
57
+                );
58 58
 
59 59
     }//end getErrorList()
60 60
 
Please login to merge, or discard this patch.