Completed
Pull Request — develop (#1492)
by Zack
28:58 queued 09:00
created
php_codesniffer/src/Standards/Generic/Sniffs/Files/LineEndingsSniff.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -95,18 +95,18 @@
 block discarded – undo
95 95
         if ($fix === true) {
96 96
             $tokens = $phpcsFile->getTokens();
97 97
             switch ($this->eolChar) {
98
-            case '\n':
99
-                $eolChar = "\n";
100
-                break;
101
-            case '\r':
102
-                $eolChar = "\r";
103
-                break;
104
-            case '\r\n':
105
-                $eolChar = "\r\n";
106
-                break;
107
-            default:
108
-                $eolChar = $this->eolChar;
109
-                break;
98
+            	case '\n':
99
+                	$eolChar = "\n";
100
+                	break;
101
+            	case '\r':
102
+                	$eolChar = "\r";
103
+                	break;
104
+            	case '\r\n':
105
+                	$eolChar = "\r\n";
106
+                	break;
107
+            	default:
108
+                	$eolChar = $this->eolChar;
109
+                	break;
110 110
             }
111 111
 
112 112
             for ($i = 0; $i < $phpcsFile->numTokens; $i++) {
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,20 +28,20 @@
 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.3.inc':
35
-        case 'ClosingTagUnitTest.4.inc':
36
-        case 'ClosingTagUnitTest.5.inc':
37
-        case 'ClosingTagUnitTest.7.inc':
38
-            return [1 => 1];
34
+        	case 'ClosingTagUnitTest.3.inc':
35
+        	case 'ClosingTagUnitTest.4.inc':
36
+        	case 'ClosingTagUnitTest.5.inc':
37
+        	case 'ClosingTagUnitTest.7.inc':
38
+            	return [1 => 1];
39 39
 
40
-        case 'ClosingTagUnitTest.6.inc':
41
-            return [3 => 1];
40
+        	case 'ClosingTagUnitTest.6.inc':
41
+            	return [3 => 1];
42 42
 
43
-        default:
44
-            return [];
43
+        	default:
44
+            	return [];
45 45
         }
46 46
 
47 47
     }//end getErrorList()
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php 1 patch
Switch Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -28,66 +28,66 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='OperatorBracketUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'OperatorBracketUnitTest.inc':
32
-            return [
33
-                3   => 1,
34
-                6   => 1,
35
-                9   => 1,
36
-                12  => 1,
37
-                15  => 1,
38
-                18  => 2,
39
-                20  => 1,
40
-                25  => 1,
41
-                28  => 1,
42
-                31  => 1,
43
-                34  => 1,
44
-                37  => 1,
45
-                40  => 1,
46
-                43  => 2,
47
-                45  => 1,
48
-                47  => 5,
49
-                48  => 1,
50
-                50  => 2,
51
-                55  => 2,
52
-                56  => 1,
53
-                63  => 2,
54
-                64  => 1,
55
-                67  => 1,
56
-                86  => 1,
57
-                90  => 1,
58
-                109 => 1,
59
-                130 => 1,
60
-                134 => 1,
61
-                135 => 2,
62
-                137 => 1,
63
-                139 => 1,
64
-                150 => 1,
65
-                161 => 1,
66
-                163 => 2,
67
-                165 => 2,
68
-                169 => 1,
69
-            ];
70
-            break;
71
-        case 'OperatorBracketUnitTest.js':
72
-            return [
73
-                5   => 1,
74
-                8   => 1,
75
-                11  => 1,
76
-                14  => 1,
77
-                24  => 1,
78
-                30  => 1,
79
-                33  => 1,
80
-                36  => 1,
81
-                39  => 1,
82
-                46  => 1,
83
-                47  => 1,
84
-                63  => 1,
85
-                108 => 1,
86
-            ];
87
-             break;
88
-        default:
89
-            return [];
90
-            break;
31
+        	case 'OperatorBracketUnitTest.inc':
32
+            	return [
33
+                	3   => 1,
34
+                	6   => 1,
35
+                	9   => 1,
36
+                	12  => 1,
37
+                	15  => 1,
38
+                	18  => 2,
39
+                	20  => 1,
40
+                	25  => 1,
41
+                	28  => 1,
42
+                	31  => 1,
43
+                	34  => 1,
44
+                	37  => 1,
45
+                	40  => 1,
46
+                	43  => 2,
47
+                	45  => 1,
48
+                	47  => 5,
49
+                	48  => 1,
50
+                	50  => 2,
51
+                	55  => 2,
52
+                	56  => 1,
53
+                	63  => 2,
54
+                	64  => 1,
55
+                	67  => 1,
56
+                	86  => 1,
57
+                	90  => 1,
58
+                	109 => 1,
59
+                	130 => 1,
60
+                	134 => 1,
61
+                	135 => 2,
62
+                	137 => 1,
63
+                	139 => 1,
64
+                	150 => 1,
65
+                	161 => 1,
66
+                	163 => 2,
67
+                	165 => 2,
68
+                	169 => 1,
69
+            	];
70
+            	break;
71
+        	case 'OperatorBracketUnitTest.js':
72
+            	return [
73
+                	5   => 1,
74
+                	8   => 1,
75
+                	11  => 1,
76
+                	14  => 1,
77
+                	24  => 1,
78
+                	30  => 1,
79
+                	33  => 1,
80
+                	36  => 1,
81
+                	39  => 1,
82
+                	46  => 1,
83
+                	47  => 1,
84
+                	63  => 1,
85
+                	108 => 1,
86
+            	];
87
+             	break;
88
+        	default:
89
+            	return [];
90
+            	break;
91 91
         }//end switch
92 92
 
93 93
     }//end getErrorList()
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.php 1 patch
Switch Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -28,28 +28,28 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='DisallowSizeFunctionsInLoopsUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'DisallowSizeFunctionsInLoopsUnitTest.inc':
32
-            return [
33
-                2  => 1,
34
-                7  => 1,
35
-                11 => 1,
36
-                13 => 1,
37
-                18 => 1,
38
-                23 => 1,
39
-                27 => 1,
40
-                29 => 1,
41
-                35 => 1,
42
-                40 => 1,
43
-                44 => 1,
44
-                46 => 1,
45
-            ];
46
-            break;
47
-        case 'DisallowSizeFunctionsInLoopsUnitTest.js':
48
-            return [1 => 1];
49
-            break;
50
-        default:
51
-            return [];
52
-            break;
31
+        	case 'DisallowSizeFunctionsInLoopsUnitTest.inc':
32
+            	return [
33
+                	2  => 1,
34
+                	7  => 1,
35
+                	11 => 1,
36
+                	13 => 1,
37
+                	18 => 1,
38
+                	23 => 1,
39
+                	27 => 1,
40
+                	29 => 1,
41
+                	35 => 1,
42
+                	40 => 1,
43
+                	44 => 1,
44
+                	46 => 1,
45
+            	];
46
+            	break;
47
+        	case 'DisallowSizeFunctionsInLoopsUnitTest.js':
48
+            	return [1 => 1];
49
+            	break;
50
+        	default:
51
+            	return [];
52
+            	break;
53 53
         }//end switch
54 54
 
55 55
     }//end getErrorList()
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php 1 patch
Switch Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -43,52 +43,52 @@
 block discarded – undo
43 43
     public function getWarningList($testFile='')
44 44
     {
45 45
         switch ($testFile) {
46
-        case 'NonExecutableCodeUnitTest.1.inc':
47
-            return [
48
-                5   => 1,
49
-                11  => 1,
50
-                17  => 1,
51
-                18  => 1,
52
-                19  => 2,
53
-                28  => 1,
54
-                32  => 1,
55
-                33  => 2,
56
-                34  => 2,
57
-                42  => 1,
58
-                45  => 1,
59
-                54  => 1,
60
-                58  => 1,
61
-                73  => 1,
62
-                83  => 1,
63
-                95  => 1,
64
-                105 => 1,
65
-                123 => 1,
66
-                147 => 1,
67
-                150 => 1,
68
-                153 => 1,
69
-                166 => 1,
70
-                180 => 1,
71
-                232 => 1,
72
-                240 => 1,
73
-                246 => 1,
74
-                252 => 1,
75
-                253 => 1,
76
-                254 => 2,
77
-            ];
78
-            break;
79
-        case 'NonExecutableCodeUnitTest.2.inc':
80
-            return [
81
-                7  => 1,
82
-                8  => 1,
83
-                9  => 1,
84
-                10 => 2,
85
-                14 => 1,
86
-                48 => 2,
87
-            ];
88
-            break;
89
-        default:
90
-            return [];
91
-            break;
46
+        	case 'NonExecutableCodeUnitTest.1.inc':
47
+            	return [
48
+                	5   => 1,
49
+                	11  => 1,
50
+                	17  => 1,
51
+                	18  => 1,
52
+                	19  => 2,
53
+                	28  => 1,
54
+                	32  => 1,
55
+                	33  => 2,
56
+                	34  => 2,
57
+                	42  => 1,
58
+                	45  => 1,
59
+                	54  => 1,
60
+                	58  => 1,
61
+                	73  => 1,
62
+                	83  => 1,
63
+                	95  => 1,
64
+                	105 => 1,
65
+                	123 => 1,
66
+                	147 => 1,
67
+                	150 => 1,
68
+                	153 => 1,
69
+                	166 => 1,
70
+                	180 => 1,
71
+                	232 => 1,
72
+                	240 => 1,
73
+                	246 => 1,
74
+                	252 => 1,
75
+                	253 => 1,
76
+                	254 => 2,
77
+            	];
78
+            	break;
79
+        	case 'NonExecutableCodeUnitTest.2.inc':
80
+            	return [
81
+                	7  => 1,
82
+                	8  => 1,
83
+                	9  => 1,
84
+                	10 => 2,
85
+                	14 => 1,
86
+                	48 => 2,
87
+            	];
88
+            	break;
89
+        	default:
90
+            	return [];
91
+            	break;
92 92
         }//end switch
93 93
 
94 94
     }//end getWarningList()
Please login to merge, or discard this patch.
squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.inc 1 patch
Switch Indentation   -6 removed lines patch added patch discarded remove patch
@@ -19,9 +19,3 @@
 block discarded – undo
19 19
         $arr = array(
20 20
             'a' => 'a'
21 21
 <<<<<<< HEAD
22
-            'b' => 'b'
23
-=======
24
-            'c' => 'c'
25
->>>>>>> master
26
-        );
27
-    }
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.1.inc 1 patch
Switch Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
 }
50 50
 
51 51
 switch ($lowerVarType) {
52
-    case 'bool':
53
-        return 'boolean';
54
-        echo 'hi';
55
-    case 'double':
56
-    case 'real':
57
-        return 'float';
58
-        echo 'hi';
52
+    	case 'bool':
53
+        	return 'boolean';
54
+        	echo 'hi';
55
+    	case 'double':
56
+    	case 'real':
57
+        	return 'float';
58
+        	echo 'hi';
59 59
 }
60 60
 
61 61
 while ($line=fgets($fp,2*1024*1024))
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
 }
67 67
 
68 68
 switch ($var) {
69
-    case 1:
70
-        echo '1';
71
-    break;
72
-
73
-        echo 'non-executable';
74
-    default:
75
-        echo '2';
76
-    break;
69
+    	case 1:
70
+        	echo '1';
71
+    	break;
72
+
73
+        	echo 'non-executable';
74
+    	default:
75
+        	echo '2';
76
+    	break;
77 77
 }
78 78
 
79 79
 switch (0) {
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
 }//end myFunction()
125 125
 
126 126
 switch ($var) {
127
-    case 1: {
128
-        return '1';
129
-    }
127
+    	case 1: {
128
+        	return '1';
129
+    	}
130 130
 
131
-    case 2: {
132
-        return '2';
133
-    }
131
+    	case 2: {
132
+        	return '2';
133
+    	}
134 134
 }
135 135
 
136 136
 defined('FOO') or die('error');
@@ -202,12 +202,12 @@  discard block
 block discarded – undo
202 202
 }
203 203
 
204 204
 switch ($foo) {
205
-    case 'foo':
206
-        if ($foo)
207
-            return $foo;
208
-        return $bar;
209
-    default:
210
-        return $bar;
205
+    	case 'foo':
206
+        	if ($foo)
207
+            	return $foo;
208
+        	return $bar;
209
+    	default:
210
+        	return $bar;
211 211
 }
212 212
 
213 213
 function foo()
@@ -216,13 +216,13 @@  discard block
 block discarded – undo
216 216
 }
217 217
 
218 218
 switch (true) {
219
-    case 1:
220
-        return foo(
221
-            function () {
222
-                $foo = $bar;  // when this is removed it works ok
223
-                return false; // from here on it reports unreachable
224
-            }
225
-        );
219
+    	case 1:
220
+        	return foo(
221
+            	function () {
222
+                	$foo = $bar;  // when this is removed it works ok
223
+                	return false; // from here on it reports unreachable
224
+            	}
225
+        	);
226 226
 }
227 227
 
228 228
 for($i=0,$j=50; $i<100; $i++) {
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.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='DisallowInlineIfUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'DisallowInlineIfUnitTest.inc':
32
-            return [8 => 1];
33
-            break;
34
-        case 'DisallowInlineIfUnitTest.js':
35
-            return [1 => 1];
36
-            break;
37
-        default:
38
-            return [];
39
-            break;
31
+        	case 'DisallowInlineIfUnitTest.inc':
32
+            	return [8 => 1];
33
+            	break;
34
+        	case 'DisallowInlineIfUnitTest.js':
35
+            	return [1 => 1];
36
+            	break;
37
+        	default:
38
+            	return [];
39
+            	break;
40 40
         }//end switch
41 41
 
42 42
     }//end getErrorList()
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php 1 patch
Switch Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -43,32 +43,32 @@
 block discarded – undo
43 43
     public function getWarningList($testFile='CommentedOutCodeUnitTest.inc')
44 44
     {
45 45
         switch ($testFile) {
46
-        case 'CommentedOutCodeUnitTest.inc':
47
-            return [
48
-                6   => 1,
49
-                8   => 1,
50
-                15  => 1,
51
-                19  => 1,
52
-                35  => 1,
53
-                87  => 1,
54
-                91  => 1,
55
-                97  => 1,
56
-                109 => 1,
57
-                116 => 1,
58
-                128 => 1,
59
-                147 => 1,
60
-                158 => 1,
61
-            ];
62
-            break;
63
-        case 'CommentedOutCodeUnitTest.css':
64
-            return [
65
-                7  => 1,
66
-                16 => 1,
67
-            ];
68
-            break;
69
-        default:
70
-            return [];
71
-            break;
46
+        	case 'CommentedOutCodeUnitTest.inc':
47
+            	return [
48
+                	6   => 1,
49
+                	8   => 1,
50
+                	15  => 1,
51
+                	19  => 1,
52
+                	35  => 1,
53
+                	87  => 1,
54
+                	91  => 1,
55
+                	97  => 1,
56
+                	109 => 1,
57
+                	116 => 1,
58
+                	128 => 1,
59
+                	147 => 1,
60
+                	158 => 1,
61
+            	];
62
+            	break;
63
+        	case 'CommentedOutCodeUnitTest.css':
64
+            	return [
65
+                	7  => 1,
66
+                	16 => 1,
67
+            	];
68
+            	break;
69
+        	default:
70
+            	return [];
71
+            	break;
72 72
         }//end switch
73 73
 
74 74
     }//end getWarningList()
Please login to merge, or discard this patch.