Completed
Pull Request — develop (#1492)
by
unknown
16:55 queued 12s
created
php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.php 1 patch
Switch Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -28,30 +28,30 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'IndentationUnitTest.1.css':
32
-            return [
33
-                2  => 1,
34
-                3  => 1,
35
-                5  => 1,
36
-                6  => 1,
37
-                7  => 1,
38
-                12 => 1,
39
-                30 => 1,
40
-                32 => 1,
41
-                50 => 1,
42
-                52 => 1,
43
-                53 => 1,
44
-                66 => 1,
45
-                67 => 1,
46
-                68 => 1,
47
-                69 => 1,
48
-                70 => 1,
49
-                71 => 1,
50
-                72 => 1,
51
-            ];
31
+        	case 'IndentationUnitTest.1.css':
32
+            	return [
33
+                	2  => 1,
34
+                	3  => 1,
35
+                	5  => 1,
36
+                	6  => 1,
37
+                	7  => 1,
38
+                	12 => 1,
39
+                	30 => 1,
40
+                	32 => 1,
41
+                	50 => 1,
42
+                	52 => 1,
43
+                	53 => 1,
44
+                	66 => 1,
45
+                	67 => 1,
46
+                	68 => 1,
47
+                	69 => 1,
48
+                	70 => 1,
49
+                	71 => 1,
50
+                	72 => 1,
51
+            	];
52 52
 
53
-        default:
54
-            return [];
53
+        	default:
54
+            	return [];
55 55
         }//end switch
56 56
 
57 57
     }//end getErrorList()
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,18 +28,18 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'ClosingTagUnitTest.1.inc':
32
-            return [11 => 1];
31
+        	case 'ClosingTagUnitTest.1.inc':
32
+            	return [11 => 1];
33 33
 
34
-        case 'ClosingTagUnitTest.4.inc':
35
-        case 'ClosingTagUnitTest.5.inc':
36
-            return [1 => 1];
34
+        	case 'ClosingTagUnitTest.4.inc':
35
+        	case 'ClosingTagUnitTest.5.inc':
36
+            	return [1 => 1];
37 37
 
38
-        case 'ClosingTagUnitTest.6.inc':
39
-            return [5 => 1];
38
+        	case 'ClosingTagUnitTest.6.inc':
39
+            	return [5 => 1];
40 40
 
41
-        default:
42
-            return [];
41
+        	default:
42
+            	return [];
43 43
         }
44 44
 
45 45
     }//end getErrorList()
Please login to merge, or discard this patch.
src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.10.inc 1 patch
Switch Indentation   -2 removed lines patch added patch discarded remove patch
@@ -1,3 +1,1 @@
 block discarded – undo
1 1
 <?php
2
-/** Why me?
3
-
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'EndFileNewlineUnitTest.1.inc':
32
-        case 'EndFileNewlineUnitTest.3.inc':
33
-        case 'EndFileNewlineUnitTest.6.inc':
34
-        case 'EndFileNewlineUnitTest.7.inc':
35
-        case 'EndFileNewlineUnitTest.9.inc':
36
-        case 'EndFileNewlineUnitTest.10.inc':
37
-            return [2 => 1];
38
-        default:
39
-            return [];
31
+        	case 'EndFileNewlineUnitTest.1.inc':
32
+        	case 'EndFileNewlineUnitTest.3.inc':
33
+        	case 'EndFileNewlineUnitTest.6.inc':
34
+        	case 'EndFileNewlineUnitTest.7.inc':
35
+        	case 'EndFileNewlineUnitTest.9.inc':
36
+        	case 'EndFileNewlineUnitTest.10.inc':
37
+            	return [2 => 1];
38
+        	default:
39
+            	return [];
40 40
         }//end switch
41 41
 
42 42
     }//end getErrorList()
Please login to merge, or discard this patch.
src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc 1 patch
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
 }
35 35
 
36 36
 switch ($foo) {
37
-    case'Foo': {
38
-        echo 'foo';
39
-        break;
40
-        }
37
+    	case'Foo': {
38
+        	echo 'foo';
39
+        	break;
40
+        	}
41 41
 }
42 42
 
43 43
 while ($i < 10) {
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 }
53 53
 
54 54
 switch (true) {
55
-    case is_resource($value):
56
-        throw new Exception('foo');
57
-    case is_object($value):
58
-        return 'object';
55
+    	case is_resource($value):
56
+        	throw new Exception('foo');
57
+    	case is_object($value):
58
+        	return 'object';
59 59
 }
60 60
 
61 61
 switch (0) {
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 }
106 106
 
107 107
 switch ($foo) {
108
-    case 1: $bar = 1; break;
109
-    case 2:
108
+    	case 1: $bar = 1; break;
109
+    	case 2:
110 110
     
111
-        $bar = 2; break;
112
-    case 21:
113
-    case 3: return 3;
114
-    default: $bar = 0;
111
+        	$bar = 2; break;
112
+    	case 21:
113
+    	case 3: return 3;
114
+    	default: $bar = 0;
115 115
 }
116 116
 
117 117
 switch ($foo) {
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
 }
147 147
 
148 148
 switch ($foo) {
149
-    case Foo::INTERFACE:
150
-        return self::INTERFACE;
151
-    case Foo::NAMESPACE:
152
-        return self::MODULE;
153
-    case Foo::TRAIT:
154
-    case Foo::ARRAY:
155
-        return self::VALUE;
149
+    	case Foo::INTERFACE:
150
+        	return self::INTERFACE;
151
+    	case Foo::NAMESPACE:
152
+        	return self::MODULE;
153
+    	case Foo::TRAIT:
154
+    	case Foo::ARRAY:
155
+        	return self::VALUE;
156 156
 }
157 157
 
158 158
 // OK: Every clause terminates
Please login to merge, or discard this patch.
src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php 1 patch
Switch Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -28,49 +28,49 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'UseDeclarationUnitTest.2.inc':
32
-            return [
33
-                4  => 1,
34
-                5  => 1,
35
-                6  => 1,
36
-                7  => 1,
37
-                12 => 2,
38
-            ];
39
-        case 'UseDeclarationUnitTest.3.inc':
40
-            return [
41
-                4 => 1,
42
-                6 => 1,
43
-            ];
44
-        case 'UseDeclarationUnitTest.5.inc':
45
-            return [
46
-                5  => 1,
47
-                6  => 1,
48
-                8  => 1,
49
-                14 => 1,
50
-                17 => 1,
51
-                18 => 1,
52
-                19 => 1,
53
-                21 => 1,
54
-                28 => 1,
55
-                30 => 1,
56
-                35 => 1,
57
-            ];
58
-        case 'UseDeclarationUnitTest.10.inc':
59
-        case 'UseDeclarationUnitTest.11.inc':
60
-        case 'UseDeclarationUnitTest.12.inc':
61
-        case 'UseDeclarationUnitTest.13.inc':
62
-        case 'UseDeclarationUnitTest.14.inc':
63
-        case 'UseDeclarationUnitTest.16.inc':
64
-        case 'UseDeclarationUnitTest.17.inc':
65
-            return [2 => 1];
66
-        case 'UseDeclarationUnitTest.15.inc':
67
-            return [
68
-                3 => 1,
69
-                4 => 1,
70
-                5 => 1,
71
-            ];
72
-        default:
73
-            return [];
31
+        	case 'UseDeclarationUnitTest.2.inc':
32
+            	return [
33
+                	4  => 1,
34
+                	5  => 1,
35
+                	6  => 1,
36
+                	7  => 1,
37
+                	12 => 2,
38
+            	];
39
+        	case 'UseDeclarationUnitTest.3.inc':
40
+            	return [
41
+                	4 => 1,
42
+                	6 => 1,
43
+            	];
44
+        	case 'UseDeclarationUnitTest.5.inc':
45
+            	return [
46
+                	5  => 1,
47
+                	6  => 1,
48
+                	8  => 1,
49
+                	14 => 1,
50
+                	17 => 1,
51
+                	18 => 1,
52
+                	19 => 1,
53
+                	21 => 1,
54
+                	28 => 1,
55
+                	30 => 1,
56
+                	35 => 1,
57
+            	];
58
+        	case 'UseDeclarationUnitTest.10.inc':
59
+        	case 'UseDeclarationUnitTest.11.inc':
60
+        	case 'UseDeclarationUnitTest.12.inc':
61
+        	case 'UseDeclarationUnitTest.13.inc':
62
+        	case 'UseDeclarationUnitTest.14.inc':
63
+        	case 'UseDeclarationUnitTest.16.inc':
64
+        	case 'UseDeclarationUnitTest.17.inc':
65
+            	return [2 => 1];
66
+        	case 'UseDeclarationUnitTest.15.inc':
67
+            	return [
68
+                	3 => 1,
69
+                	4 => 1,
70
+                	5 => 1,
71
+            	];
72
+        	default:
73
+            	return [];
74 74
         }//end switch
75 75
 
76 76
     }//end getErrorList()
Please login to merge, or discard this patch.
src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -71,18 +71,18 @@
 block discarded – undo
71 71
         $prefix = $stackPtr;
72 72
         while (($prefix = $phpcsFile->findPrevious(Tokens::$methodPrefixes, ($prefix - 1), $prev)) !== false) {
73 73
             switch ($tokens[$prefix]['code']) {
74
-            case T_STATIC:
75
-                $static = $prefix;
76
-                break;
77
-            case T_ABSTRACT:
78
-                $abstract = $prefix;
79
-                break;
80
-            case T_FINAL:
81
-                $final = $prefix;
82
-                break;
83
-            default:
84
-                $visibility = $prefix;
85
-                break;
74
+            	case T_STATIC:
75
+                	$static = $prefix;
76
+                	break;
77
+            	case T_ABSTRACT:
78
+                	$abstract = $prefix;
79
+                	break;
80
+            	case T_FINAL:
81
+                	$final = $prefix;
82
+                	break;
83
+            	default:
84
+                	$visibility = $prefix;
85
+                	break;
86 86
             }
87 87
         }
88 88
 
Please login to merge, or discard this patch.
src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php 1 patch
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,14 +67,14 @@
 block discarded – undo
67 67
                 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'MultipleDeclarations');
68 68
                 if ($fix === true) {
69 69
                     switch ($tokens[($stackPtr + 2)]['content']) {
70
-                    case 'const':
71
-                        $baseUse = 'use const';
72
-                        break;
73
-                    case 'function':
74
-                        $baseUse = 'use function';
75
-                        break;
76
-                    default:
77
-                        $baseUse = 'use';
70
+                    	case 'const':
71
+                        	$baseUse = 'use const';
72
+                        	break;
73
+                    	case 'function':
74
+                        	$baseUse = 'use function';
75
+                        	break;
76
+                    	default:
77
+                        	$baseUse = 'use';
78 78
                     }
79 79
 
80 80
                     $phpcsFile->fixer->replaceToken($next, ';'.$phpcsFile->eolChar.$baseUse);
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -47,24 +47,24 @@
 block discarded – undo
47 47
     public function getErrorList($testFile='')
48 48
     {
49 49
         switch ($testFile) {
50
-        case 'ClassDeclarationUnitTest.1.inc':
51
-            return [
52
-                21  => 1,
53
-                22  => 1,
54
-                23  => 1,
55
-                27  => 1,
56
-                33  => 1,
57
-                38  => 1,
58
-                49  => 1,
59
-                84  => 1,
60
-                94  => 1,
61
-                99  => 1,
62
-                104 => 1,
63
-                110 => 1,
64
-            ];
65
-
66
-        default:
67
-            return [];
50
+        	case 'ClassDeclarationUnitTest.1.inc':
51
+            	return [
52
+                	21  => 1,
53
+                	22  => 1,
54
+                	23  => 1,
55
+                	27  => 1,
56
+                	33  => 1,
57
+                	38  => 1,
58
+                	49  => 1,
59
+                	84  => 1,
60
+                	94  => 1,
61
+                	99  => 1,
62
+                	104 => 1,
63
+                	110 => 1,
64
+            	];
65
+
66
+        	default:
67
+            	return [];
68 68
         }//end switch
69 69
 
70 70
     }//end getErrorList()
Please login to merge, or discard this patch.