Completed
Pull Request — master (#7)
by Tomáš
09:48 queued 03:17
created
src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 $test = $this->testThis();
3
-$test = $this->testThis() ;
4
-$test = $this->testThis()           ;
5
-for ($var = 1   ; $var < 10  ; $var++) {
6
-    echo $var ;
3
+$test = $this->testThis();
4
+$test = $this->testThis();
5
+for ($var = 1; $var < 10; $var++) {
6
+    echo $var;
7 7
 }
8 8
 $test = $this->testThis()  /* comment here */;
9
-$test = $this->testThis()  /* comment here */  ;
9
+$test = $this->testThis()  /* comment here */;
10 10
 
11
-$hello ='foo';
11
+$hello = 'foo';
12 12
 ;
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if ($foo || $bar) {}
4
-if ($foo||$bar && $baz) {}
5
-if ($foo|| $bar&&$baz) {}
6
-if ($foo  ||   $bar   && $baz) {}
4
+if ($foo || $bar && $baz) {}
5
+if ($foo || $bar && $baz) {}
6
+if ($foo || $bar && $baz) {}
7 7
 
8 8
 // Spacing after || below is ignored as it is EOL whitespace.
9 9
 if ($foo ||    
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 ) {
13 13
 }
14 14
 
15
-if ($foo||
15
+if ($foo ||
16 16
     $bar
17 17
     &&$baz
18 18
 ) {
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
     function test1()
10 10
     {
11
-     }
11
+        }
12 12
 
13 13
     function test2() {}
14 14
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 class Test2
23 23
 {
24
- }
24
+    }
25 25
 
26 26
 
27 27
 public function test2()
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     if (!class_exists($class_name)) {
34 34
         echo $error;
35 35
     }
36
-    $this->{$property} =& new $class_name($this->db_index);
37
-    $this->modules[$module] =& $this->{$property};
36
+    $this->{$property} = & new $class_name($this->db_index);
37
+    $this->modules[$module] = & $this->{$property};
38 38
 }
39 39
 
40 40
 foreach ($elements as $element) {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 ?>
64 64
 
65
-<?php while($row = $data->getRow()): ?>
65
+<?php while ($row = $data->getRow()): ?>
66 66
     <p><?= $val ?></p>
67 67
 <?php endwhile; ?>
68 68
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
47 47
             return array(
48 48
                     4 => 1,
49 49
                     5 => 1,
50
-                   );
50
+                    );
51 51
         } else if (version_compare(PHP_VERSION, '5.4.0RC1') >= 0) {
52 52
             // Shorthand echo is always available from PHP 5.4.0 but needed the
53 53
             // short_open_tag ini var to be set for versions before this.
54 54
             return array(
55 55
                     4 => 1,
56
-                   );
56
+                    );
57 57
         }
58 58
 
59 59
         return array();
Please login to merge, or discard this patch.
Switch Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -45,23 +45,23 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='FunctionOpeningBraceSpaceUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48
-        case 'FunctionOpeningBraceSpaceUnitTest.inc':
49
-            return array(
50
-                    10 => 1,
51
-                    25 => 1,
52
-                   );
53
-            break;
54
-        case 'FunctionOpeningBraceSpaceUnitTest.js':
55
-            return array(
56
-                    11 => 1,
57
-                    31 => 1,
58
-                    38 => 1,
59
-                    88 => 1,
60
-                   );
61
-            break;
62
-        default:
63
-            return array();
64
-            break;
48
+            case 'FunctionOpeningBraceSpaceUnitTest.inc':
49
+                return array(
50
+                        10 => 1,
51
+                        25 => 1,
52
+                       );
53
+                break;
54
+            case 'FunctionOpeningBraceSpaceUnitTest.js':
55
+                return array(
56
+                        11 => 1,
57
+                        31 => 1,
58
+                        38 => 1,
59
+                        88 => 1,
60
+                       );
61
+                break;
62
+            default:
63
+                return array();
64
+                break;
65 65
         }//end switch
66 66
         
67 67
 
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='FunctionOpeningBraceSpaceUnitTest.inc')
45
+    public function getErrorList($testFile = 'FunctionOpeningBraceSpaceUnitTest.inc')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'FunctionOpeningBraceSpaceUnitTest.inc':
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
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.
src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 $var = (int) $var2;
3
-$var = ( int ) $var2;
4
-$var = (int ) $var2;
5
-$var = ( int) $var2;
6
-$var = (	int	) $var2;
3
+$var = (int) $var2;
4
+$var = (int) $var2;
5
+$var = (int) $var2;
6
+$var = (int) $var2;
7 7
 ?>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,8 +111,8 @@
 block discarded – undo
111 111
 $closureWithDefaultParameter = function (array $testArray=array()) {};
112 112
 
113 113
 switch ($foo) {
114
-	case -1:
115
-		break;
114
+    case -1:
115
+        break;
116 116
 }
117 117
 
118 118
 $y = 1 * -1;
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -1,67 +1,67 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $result = 1 + 2;
4
-$result = 1  + 2;
5
-$result = 1  +   2;
6
-$result = 1 +2;
7
-$result = 1+ 2;
8
-$result = 1+2;
4
+$result = 1 + 2;
5
+$result = 1 + 2;
6
+$result = 1 + 2;
7
+$result = 1 + 2;
8
+$result = 1 + 2;
9 9
 
10 10
 $result = 1 - 2;
11
-$result = 1  - 2;
12
-$result = 1  -   2;
13
-$result = 1 -2;
14
-$result = 1- 2;
15
-$result = 1-2;
11
+$result = 1 - 2;
12
+$result = 1 - 2;
13
+$result = 1 - 2;
14
+$result = 1 - 2;
15
+$result = 1 - 2;
16 16
 
17 17
 $result = 1 * 2;
18
-$result = 1  * 2;
19
-$result = 1  *   2;
20
-$result = 1 *2;
21
-$result = 1* 2;
22
-$result = 1*2;
18
+$result = 1 * 2;
19
+$result = 1 * 2;
20
+$result = 1 * 2;
21
+$result = 1 * 2;
22
+$result = 1 * 2;
23 23
 
24 24
 $result = 1 / 2;
25
-$result = 1  / 2;
26
-$result = 1  /   2;
27
-$result = 1 /2;
28
-$result = 1/ 2;
29
-$result = 1/2;
25
+$result = 1 / 2;
26
+$result = 1 / 2;
27
+$result = 1 / 2;
28
+$result = 1 / 2;
29
+$result = 1 / 2;
30 30
 
31 31
 $result = 1 % 2;
32
-$result = 1  % 2;
33
-$result = 1  %   2;
34
-$result = 1 %2;
35
-$result = 1% 2;
36
-$result = 1%2;
32
+$result = 1 % 2;
33
+$result = 1 % 2;
34
+$result = 1 % 2;
35
+$result = 1 % 2;
36
+$result = 1 % 2;
37 37
 $result = '100%';
38 38
 
39 39
 $result += 4;
40
-$result+=4;
40
+$result += 4;
41
+$result -= 4;
41 42
 $result -= 4;
42
-$result-=4;
43 43
 $result /= 4;
44
-$result/=4;
45
-$result *=4;
46
-$result*=4;
44
+$result /= 4;
45
+$result *= 4;
46
+$result *= 4;
47 47
 
48
-$result =& $thing;
48
+$result = & $thing;
49 49
 if ($result & 4) {
50 50
     if ($result | 4) {
51 51
     }
52 52
 }
53
-if ($result&4 && $result  &  4) {
54
-    if ($result |4 || $result  |  4) {
53
+if ($result & 4 && $result & 4) {
54
+    if ($result | 4 || $result | 4) {
55 55
     }
56 56
 }
57 57
 
58 58
 $result = ((1 + 2) - (3 * 4 / 5) % 6);
59
-$result = ((1+  2)  -  (3*4/5)  %  6);
59
+$result = ((1 + 2) - (3 * 4 / 5) % 6);
60 60
 return -1;
61 61
 $file = '...'.substr($file, (($padding * -1) + 3));
62 62
 
63 63
 $totalErrors   += $errors['errors'];
64
-$totalWarnings +=  $errors['warnings'];
64
+$totalWarnings += $errors['warnings'];
65 65
 
66 66
 if (substr($line, 0, 3) === '/**') {
67 67
     $line = substr($line, 3);
@@ -74,23 +74,23 @@  discard block
 block discarded – undo
74 74
 if ($pos === -1) {
75 75
 }
76 76
 
77
-for ($i=0; $i<=5; $i++) {
78
-    $j^= $i;
79
-    $k %=$i;
80
-    $l&=$i;
81
-    $m.= 'Hello ';
77
+for ($i = 0; $i <= 5; $i++) {
78
+    $j ^= $i;
79
+    $k %= $i;
80
+    $l &= $i;
81
+    $m .= 'Hello ';
82 82
 }
83 83
 
84
-$z = ($a+ $b- $c* $d/ $e% $f^ $g);
85
-$z = ($a +$b -$c *$d /$e %$f ^$g);
84
+$z = ($a + $b - $c * $d / $e % $f ^ $g);
85
+$z = ($a + $b - $c * $d / $e % $f ^ $g);
86 86
 
87
-$a== $b && $c!= $d && $e=== $f && $g!== $h;
88
-$i> $j && $k< $l && $m>= $n && $o<= $p && $q<> $r;
87
+$a == $b && $c != $d && $e === $f && $g !== $h;
88
+$i > $j && $k < $l && $m >= $n && $o <= $p && $q <> $r;
89 89
 
90
-$a ==$b && $c !=$d && $e ===$f && $g !==$h;
91
-$i >$j && $k <$l && $m >=$n && $o <=$p && $q <>$r;
90
+$a == $b && $c != $d && $e === $f && $g !== $h;
91
+$i > $j && $k < $l && $m >= $n && $o <= $p && $q <> $r;
92 92
 
93
-function myFunction($variable=0, $var2='string') {}
93
+function myFunction($variable = 0, $var2 = 'string') {}
94 94
 
95 95
 if (index > -1) {
96 96
 }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 $y = $test ? 1 : -1;
109 109
 $z = $test ?: false;
110 110
 
111
-$closureWithDefaultParameter = function (array $testArray=array()) {};
111
+$closureWithDefaultParameter = function(array $testArray = array()) {};
112 112
 
113 113
 switch ($foo) {
114 114
 	case -1:
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 $y = 10 + -2;
126 126
 $y = -10 + 2;
127 127
 
128
-$a = $x?$y:$z;
128
+$a = $x ? $y : $z;
129 129
 $a = $x ? $y : $z;
130 130
 
131 131
 $y = 1
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 if ($a <=>$b) {
175 175
 }
176 176
 
177
-$a |=  $b;
177
+$a |= $b;
178 178
 $a **=  $b;
179 179
 
180 180
 $a = +1;
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.