Completed
Branch RELEASE (416965)
by
unknown
12:45 queued 13s
created
src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -15,41 +15,41 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @return array<int, int>
25
-     */
26
-    public function getErrorList()
27
-    {
28
-        return [
29
-            13 => 1,
30
-            33 => 1,
31
-            49 => 1,
32
-            50 => 1,
33
-            51 => 1,
34
-            52 => 1,
35
-        ];
36
-
37
-    }//end getErrorList()
38
-
39
-
40
-    /**
41
-     * Returns the lines where warnings should occur.
42
-     *
43
-     * The key of the array should represent the line number and the value
44
-     * should represent the number of warnings that should occur on that line.
45
-     *
46
-     * @return array<int, int>
47
-     */
48
-    public function getWarningList()
49
-    {
50
-        return [];
51
-
52
-    }//end getWarningList()
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @return array<int, int>
25
+	 */
26
+	public function getErrorList()
27
+	{
28
+		return [
29
+			13 => 1,
30
+			33 => 1,
31
+			49 => 1,
32
+			50 => 1,
33
+			51 => 1,
34
+			52 => 1,
35
+		];
36
+
37
+	}//end getErrorList()
38
+
39
+
40
+	/**
41
+	 * Returns the lines where warnings should occur.
42
+	 *
43
+	 * The key of the array should represent the line number and the value
44
+	 * should represent the number of warnings that should occur on that line.
45
+	 *
46
+	 * @return array<int, int>
47
+	 */
48
+	public function getWarningList()
49
+	{
50
+		return [];
51
+
52
+	}//end getWarningList()
53 53
 
54 54
 
55 55
 }//end class
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      *
26 26
      * @return array<int, int>
27 27
      */
28
-    public function getErrorList($testFile='PostStatementCommentUnitTest.inc')
28
+    public function getErrorList($testFile = 'PostStatementCommentUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31 31
         case 'PostStatementCommentUnitTest.inc':
Please login to merge, or discard this patch.
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -15,55 +15,55 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @param string $testFile The name of the file being tested.
25
-     *
26
-     * @return array<int, int>
27
-     */
28
-    public function getErrorList($testFile='PostStatementCommentUnitTest.inc')
29
-    {
30
-        switch ($testFile) {
31
-        case 'PostStatementCommentUnitTest.inc':
32
-            return [
33
-                6  => 1,
34
-                10 => 1,
35
-                18 => 1,
36
-                35 => 1,
37
-                53 => 1,
38
-            ];
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @param string $testFile The name of the file being tested.
25
+	 *
26
+	 * @return array<int, int>
27
+	 */
28
+	public function getErrorList($testFile='PostStatementCommentUnitTest.inc')
29
+	{
30
+		switch ($testFile) {
31
+		case 'PostStatementCommentUnitTest.inc':
32
+			return [
33
+				6  => 1,
34
+				10 => 1,
35
+				18 => 1,
36
+				35 => 1,
37
+				53 => 1,
38
+			];
39 39
 
40
-        case 'PostStatementCommentUnitTest.1.js':
41
-            return [
42
-                1 => 1,
43
-                4 => 1,
44
-                9 => 1,
45
-            ];
40
+		case 'PostStatementCommentUnitTest.1.js':
41
+			return [
42
+				1 => 1,
43
+				4 => 1,
44
+				9 => 1,
45
+			];
46 46
 
47
-        default:
48
-            return [];
49
-        }//end switch
47
+		default:
48
+			return [];
49
+		}//end switch
50 50
 
51
-    }//end getErrorList()
51
+	}//end getErrorList()
52 52
 
53 53
 
54
-    /**
55
-     * Returns the lines where warnings should occur.
56
-     *
57
-     * The key of the array should represent the line number and the value
58
-     * should represent the number of warnings that should occur on that line.
59
-     *
60
-     * @return array<int, int>
61
-     */
62
-    public function getWarningList()
63
-    {
64
-        return [];
54
+	/**
55
+	 * Returns the lines where warnings should occur.
56
+	 *
57
+	 * The key of the array should represent the line number and the value
58
+	 * should represent the number of warnings that should occur on that line.
59
+	 *
60
+	 * @return array<int, int>
61
+	 */
62
+	public function getWarningList()
63
+	{
64
+		return [];
65 65
 
66
-    }//end getWarningList()
66
+	}//end getWarningList()
67 67
 
68 68
 
69 69
 }//end class
Please login to merge, or discard this patch.
Switch Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,24 +28,24 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='PostStatementCommentUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'PostStatementCommentUnitTest.inc':
32
-            return [
33
-                6  => 1,
34
-                10 => 1,
35
-                18 => 1,
36
-                35 => 1,
37
-                53 => 1,
38
-            ];
31
+        	case 'PostStatementCommentUnitTest.inc':
32
+            	return [
33
+                	6  => 1,
34
+                	10 => 1,
35
+                	18 => 1,
36
+                	35 => 1,
37
+                	53 => 1,
38
+            	];
39 39
 
40
-        case 'PostStatementCommentUnitTest.1.js':
41
-            return [
42
-                1 => 1,
43
-                4 => 1,
44
-                9 => 1,
45
-            ];
40
+        	case 'PostStatementCommentUnitTest.1.js':
41
+            	return [
42
+                	1 => 1,
43
+                	4 => 1,
44
+                	9 => 1,
45
+            	];
46 46
 
47
-        default:
48
-            return [];
47
+        	default:
48
+            	return [];
49 49
         }//end switch
50 50
 
51 51
     }//end getErrorList()
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc 3 patches
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -144,26 +144,26 @@
 block discarded – undo
144 144
 }
145 145
 
146 146
 switch ($var) {
147
-    case 'foo':
148
-        /*
147
+    	case 'foo':
148
+        	/*
149 149
             Foo comment.
150 150
             This is a multiple
151 151
             line comment for Foo.
152 152
         */
153 153
 
154
-        echo 'Foo';
155
-    break;
154
+        	echo 'Foo';
155
+    	break;
156 156
 
157
-    default:
157
+    	default:
158 158
 
159
-        /*
159
+        	/*
160 160
             Foo comment.
161 161
             This is a multiple
162 162
             line comment for Foo.
163 163
         */
164 164
 
165
-        echo 'Default';
166
-    break;
165
+        	echo 'Default';
166
+    	break;
167 167
 }//end switch
168 168
 
169 169
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
 /*
187 187
     Comment goes here
188 188
 */
189
-$two = (1 + 1);  // I'm not a comment closer!
189
+$two = (1 + 1); // I'm not a comment closer!
190 190
 
191 191
 class Foo
192 192
 {
Please login to merge, or discard this patch.
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -80,27 +80,27 @@  discard block
 block discarded – undo
80 80
 
81 81
 function func()
82 82
 {
83
-    echo 1;
84
-    /**
83
+	echo 1;
84
+	/**
85 85
        test
86 86
        here
87
-    **/
88
-    echo 'test';
89
-    /**
87
+	 **/
88
+	echo 'test';
89
+	/**
90 90
         Test
91 91
         here
92
-       **/
92
+	 **/
93 93
 
94 94
 }//end func()
95 95
 
96 96
 public static function test()
97 97
 {
98
-    /*
98
+	/*
99 99
         Block comments do not require a blank line before them
100 100
         if they are after T_OPEN_CURLY_BRACKET.
101 101
     */
102 102
 
103
-    $code = '';
103
+	$code = '';
104 104
 
105 105
 }//end test()
106 106
 
@@ -108,25 +108,25 @@  discard block
 block discarded – undo
108 108
 public static function test()
109 109
 {
110 110
 
111
-    /*
111
+	/*
112 112
         Block comments do not require a blank line before them
113 113
         if they are after T_OPEN_CURLY_BRACKET.
114 114
     */
115 115
 
116
-    $code = '';
116
+	$code = '';
117 117
 
118 118
 }//end test()
119 119
 
120 120
 class MyClass
121 121
 {
122 122
 
123
-    /**
124
-     * Comment should be ignored.
125
-     *
126
-     * @var   integer
127
-     * @since 4.0.0
128
-     */
129
-    const LEFT = 1;
123
+	/**
124
+	 * Comment should be ignored.
125
+	 *
126
+	 * @var   integer
127
+	 * @since 4.0.0
128
+	 */
129
+	const LEFT = 1;
130 130
 
131 131
 }
132 132
 
@@ -136,34 +136,34 @@  discard block
 block discarded – undo
136 136
  */
137 137
 final class MyClass
138 138
 {
139
-    /**
140
-     * Comment should be ignored.
141
-     *
142
-     */
143
-    final public function test() {}
139
+	/**
140
+	 * Comment should be ignored.
141
+	 *
142
+	 */
143
+	final public function test() {}
144 144
 }
145 145
 
146 146
 switch ($var) {
147
-    case 'foo':
148
-        /*
147
+	case 'foo':
148
+		/*
149 149
             Foo comment.
150 150
             This is a multiple
151 151
             line comment for Foo.
152 152
         */
153 153
 
154
-        echo 'Foo';
155
-    break;
154
+		echo 'Foo';
155
+	break;
156 156
 
157
-    default:
157
+	default:
158 158
 
159
-        /*
159
+		/*
160 160
             Foo comment.
161 161
             This is a multiple
162 162
             line comment for Foo.
163 163
         */
164 164
 
165
-        echo 'Default';
166
-    break;
165
+		echo 'Default';
166
+	break;
167 167
 }//end switch
168 168
 
169 169
 /**
@@ -191,12 +191,12 @@  discard block
 block discarded – undo
191 191
 class Foo
192 192
 {
193 193
 
194
-    /**
195
-     * Comment here.
196
-     *
197
-     * @var array
198
-     */
199
-    var $bar = array();
194
+	/**
195
+	 * Comment here.
196
+	 *
197
+	 * @var array
198
+	 */
199
+	var $bar = array();
200 200
 
201 201
 }
202 202
 
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
 
282 282
 final class MyClass
283 283
 {
284
-    /**
285
-     * Comment should be ignored, even though there is an attribute between the docblock and the function declaration
286
-     */
287
-    #[AttributeA]
288
-    #[AttributeB]
289
-    final public function test() {}
284
+	/**
285
+	 * Comment should be ignored, even though there is an attribute between the docblock and the function declaration
286
+	 */
287
+	#[AttributeA]
288
+	#[AttributeB]
289
+	final public function test() {}
290 290
 }
291 291
 
292 292
 /**
@@ -294,10 +294,10 @@  discard block
 block discarded – undo
294 294
  */
295 295
 abstract class MyClass
296 296
 {
297
-    /**
298
-     * Comment should be ignored.
299
-     */
300
-    readonly public string $prop;
297
+	/**
298
+	 * Comment should be ignored.
299
+	 */
300
+	readonly public string $prop;
301 301
 }
302 302
 
303 303
 /**
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      * @return
15 15
      * @throws
16 16
      */
17
-    private function _functionCall($stackPtr, $depth=1, $index)
17
+    private function _functionCall($stackPtr, $depth = 1, $index)
18 18
     {
19 19
         return $stackPtr;
20 20
 
@@ -532,13 +532,13 @@  discard block
 block discarded – undo
532 532
 // Closures should be ignored.
533 533
 preg_replace_callback(
534 534
     '~-([a-z])~',
535
-    function ($match) {
535
+    function($match) {
536 536
         return strtoupper($match[1]);
537 537
     },
538 538
     'hello-world'
539 539
 );
540 540
 
541
-$callback = function ($bar) use ($foo)
541
+$callback = function($bar) use ($foo)
542 542
             {
543 543
                 $bar += $foo;
544 544
             };
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
  */
586 586
 public function containsClosure()
587 587
 {
588
-    function ($e) {
588
+    function($e) {
589 589
         return new Event($e);
590 590
     },
591 591
 
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
  *
727 727
  * @return void
728 728
  */
729
-public function myFunction (string $name1, int $name2, float $name3, bool $name4) {
729
+public function myFunction(string $name1, int $name2, float $name3, bool $name4) {
730 730
 }
731 731
 
732 732
 /**
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
  */
907 907
 function returnArrayWithClosure()
908 908
 {
909
-    function () {
909
+    function() {
910 910
         return;
911 911
     };
912 912
 
@@ -937,7 +937,7 @@  discard block
 block discarded – undo
937 937
  */
938 938
 function returnVoidWithClosure()
939 939
 {
940
-    function () {
940
+    function() {
941 941
         return 1;
942 942
     };
943 943
 }
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
      */
966 966
     public function test()
967 967
     {
968
-        function () {
968
+        function() {
969 969
             return 4;
970 970
         };
971 971
     }
Please login to merge, or discard this patch.
Indentation   +277 added lines, -277 removed lines patch added patch discarded remove patch
@@ -2,148 +2,148 @@  discard block
 block discarded – undo
2 2
 class PHP_CodeSniffer_File
3 3
 {
4 4
 
5
-    /**
6
-     * a simple function comment.
7
-     *
8
-     * long desc here
9
-     *
10
-     * @param bool   $stackPtr   The position in @ @unknown the stack of the token
11
-     *                             that opened the scope
12
-     * @param int    $detph    How many scope levels down we are.
13
-     * @param string    $index    The index
14
-     * @return
15
-     * @throws
16
-     */
17
-    private function _functionCall($stackPtr, $depth=1, $index)
18
-    {
19
-        return $stackPtr;
20
-
21
-    }//end _functionCall()
22
-
23
-    //
24
-    // Sample function comment
25
-    //
26
-    //
27
-    //
28
-    public function invalidCommentStyle()
29
-    {
30
-
31
-    }//end invalidCommentStyle()
32
-
33
-
34
-    /**
35
-     *
36
-     * A simple function comment
37
-     * Span multiple line
38
-     *
39
-     *
40
-     * 0Long description with extra blank line before and after
41
-     *
42
-     *
43
-     * @return void
44
-     */
45
-    public function extraDescriptionNewlines()
46
-    {
47
-        return true;
48
-    }//end extraDescriptionNewlines()
49
-
50
-
51
-    /**
52
-     * -A simple function comment.
53
-     * @return void
54
-     */
55
-    public function missingNewlinesBeforeTags()
56
-    {
57
-        return;
58
-    }//end missingNewlinesBeforeTags()
59
-
60
-
61
-    /**
62
-     * Access tag should not be treated as a long description.
63
-     *
64
-     * @access public
65
-     * @return void
66
-     */
67
-    public function accessTag()
68
-    {
69
-
70
-    }//end accessTag()
71
-
72
-    /**
73
-     * Constructor.
74
-     *
75
-     * No return tag
76
-     */
77
-    function PHP_CodeSniffer_File()
78
-    {
79
-        return;
80
-    }
81
-
82
-
83
-    /**
84
-     * Destructor.
85
-     *
86
-     * No return tag too
87
-     */
88
-    function _PHP_CodeSniffer_File()
89
-    {
90
-        return;
91
-    }
92
-
93
-
94
-    /**
95
-     * Destructor PHP5.
96
-     */
97
-    function __destruct()
98
-    {
99
-        return;
100
-    }
101
-
102
-
103
-    function missingComment()
104
-    {
105
-        return;
106
-    }
107
-
108
-
109
-    /**
110
-     * no return tag.
111
-     *
112
-     */
113
-    public function noReturn($one)
114
-    {
115
-
116
-    }//end noReturn()
117
-
118
-
119
-    /**
120
-     * Param not immediate.
121
-     *
122
-     * @return
123
-     * @param   int   $threeSpaces
124
-     * @param integer $superfluous
125
-     * @param miss
126
-     * @param
127
-     */
128
-    public function missingDescription($threeSpaces)
129
-    {
130
-
131
-    }//end missingDescription()
132
-
133
-
134
-    /**
135
-     * Comments not capitalised.
136
-     *
137
-     * @param integer  $one    comment
138
-     * @param array    $two    -comment
139
-     * @param MyClas   $three  0comment
140
-     *
141
-     * @return void
142
-     */
143
-    public function oneSpaceAfterLongestVar($one, $two, MyClass $three)
144
-    {
145
-
146
-    }//end oneSpaceAfterLongestVar()
5
+	/**
6
+	 * a simple function comment.
7
+	 *
8
+	 * long desc here
9
+	 *
10
+	 * @param bool   $stackPtr   The position in @ @unknown the stack of the token
11
+	 *                             that opened the scope
12
+	 * @param int    $detph    How many scope levels down we are.
13
+	 * @param string    $index    The index
14
+	 * @return
15
+	 * @throws
16
+	 */
17
+	private function _functionCall($stackPtr, $depth=1, $index)
18
+	{
19
+		return $stackPtr;
20
+
21
+	}//end _functionCall()
22
+
23
+	//
24
+	// Sample function comment
25
+	//
26
+	//
27
+	//
28
+	public function invalidCommentStyle()
29
+	{
30
+
31
+	}//end invalidCommentStyle()
32
+
33
+
34
+	/**
35
+	 *
36
+	 * A simple function comment
37
+	 * Span multiple line
38
+	 *
39
+	 *
40
+	 * 0Long description with extra blank line before and after
41
+	 *
42
+	 *
43
+	 * @return void
44
+	 */
45
+	public function extraDescriptionNewlines()
46
+	{
47
+		return true;
48
+	}//end extraDescriptionNewlines()
49
+
50
+
51
+	/**
52
+	 * -A simple function comment.
53
+	 * @return void
54
+	 */
55
+	public function missingNewlinesBeforeTags()
56
+	{
57
+		return;
58
+	}//end missingNewlinesBeforeTags()
59
+
60
+
61
+	/**
62
+	 * Access tag should not be treated as a long description.
63
+	 *
64
+	 * @access public
65
+	 * @return void
66
+	 */
67
+	public function accessTag()
68
+	{
69
+
70
+	}//end accessTag()
71
+
72
+	/**
73
+	 * Constructor.
74
+	 *
75
+	 * No return tag
76
+	 */
77
+	function PHP_CodeSniffer_File()
78
+	{
79
+		return;
80
+	}
81
+
82
+
83
+	/**
84
+	 * Destructor.
85
+	 *
86
+	 * No return tag too
87
+	 */
88
+	function _PHP_CodeSniffer_File()
89
+	{
90
+		return;
91
+	}
92
+
93
+
94
+	/**
95
+	 * Destructor PHP5.
96
+	 */
97
+	function __destruct()
98
+	{
99
+		return;
100
+	}
101
+
102
+
103
+	function missingComment()
104
+	{
105
+		return;
106
+	}
107
+
108
+
109
+	/**
110
+	 * no return tag.
111
+	 *
112
+	 */
113
+	public function noReturn($one)
114
+	{
115
+
116
+	}//end noReturn()
117
+
118
+
119
+	/**
120
+	 * Param not immediate.
121
+	 *
122
+	 * @return
123
+	 * @param   int   $threeSpaces
124
+	 * @param integer $superfluous
125
+	 * @param miss
126
+	 * @param
127
+	 */
128
+	public function missingDescription($threeSpaces)
129
+	{
130
+
131
+	}//end missingDescription()
132
+
133
+
134
+	/**
135
+	 * Comments not capitalised.
136
+	 *
137
+	 * @param integer  $one    comment
138
+	 * @param array    $two    -comment
139
+	 * @param MyClas   $three  0comment
140
+	 *
141
+	 * @return void
142
+	 */
143
+	public function oneSpaceAfterLongestVar($one, $two, MyClass $three)
144
+	{
145
+
146
+	}//end oneSpaceAfterLongestVar()
147 147
 
148 148
 
149 149
 }//end class
@@ -160,19 +160,19 @@  discard block
 block discarded – undo
160 160
  */
161 161
 public function functionOutsideClass(&$str, &$foo)
162 162
 {
163
-    return;
163
+	return;
164 164
 }//end functionOutsideClass()
165 165
 
166 166
 function missingCommentOutsideClass()
167 167
 {
168
-    return;
168
+	return;
169 169
 }//end missingCommentOutsideClass()
170 170
 
171 171
 
172 172
 ?><?php
173 173
 function tagBeforeComment()
174 174
 {
175
-    return;
175
+	return;
176 176
 }//end tagBeforeComment()
177 177
 
178 178
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
  */
248 248
 public function typeHint(MyClass $a1, $a2, myclass $a3, $a4)
249 249
 {
250
-    return (3 => 'myclass obj');
250
+	return (3 => 'myclass obj');
251 251
 
252 252
 }//end typeHint()
253 253
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
  */
265 265
 public function mixedType($a1, $a2, $a3, $a4)
266 266
 {
267
-    return true;
267
+	return true;
268 268
 
269 269
 }//end mixedType()
270 270
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
  */
286 286
 public function mixedArrayType($a1, $a2, array $a3, $a4, $a5, $a6, $a7, unknownTypeHint $a8)
287 287
 {
288
-    return 1;
288
+	return 1;
289 289
 
290 290
 }//end mixedArrayType()
291 291
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
  */
321 321
 public function missingShortDescriptionInFunctionComment()
322 322
 {
323
-    return true;
323
+	return true;
324 324
 
325 325
 }//end missingShortDescriptionInFunctionComment()
326 326
 
@@ -328,25 +328,25 @@  discard block
 block discarded – undo
328 328
 class Another_Class
329 329
 {
330 330
 
331
-    /**
332
-     * Destructor should not include a return tag.
333
-     *
334
-     * @return void
335
-     */
336
-    function __destruct()
337
-    {
338
-        return;
339
-    }
340
-
341
-    /**
342
-     * Constructor should not include a return tag.
343
-     *
344
-     * @return void
345
-     */
346
-    function __construct()
347
-    {
348
-        return;
349
-    }
331
+	/**
332
+	 * Destructor should not include a return tag.
333
+	 *
334
+	 * @return void
335
+	 */
336
+	function __destruct()
337
+	{
338
+		return;
339
+	}
340
+
341
+	/**
342
+	 * Constructor should not include a return tag.
343
+	 *
344
+	 * @return void
345
+	 */
346
+	function __construct()
347
+	{
348
+		return;
349
+	}
350 350
 
351 351
 }//end class
352 352
 
@@ -388,9 +388,9 @@  discard block
 block discarded – undo
388 388
  */
389 389
 public function myFunction()
390 390
 {
391
-    if ($condition === FALSE) {
392
-        echo 'hi';
393
-    }
391
+	if ($condition === FALSE) {
392
+		echo 'hi';
393
+	}
394 394
 
395 395
 }//end myFunction()
396 396
 
@@ -402,12 +402,12 @@  discard block
 block discarded – undo
402 402
  */
403 403
 public function myFunction()
404 404
 {
405
-    if ($condition === FALSE) {
406
-        echo 'hi';
407
-        return;
408
-    }
405
+	if ($condition === FALSE) {
406
+		echo 'hi';
407
+		return;
408
+	}
409 409
 
410
-    return 'blah';
410
+	return 'blah';
411 411
 
412 412
 }//end myFunction()
413 413
 
@@ -419,11 +419,11 @@  discard block
 block discarded – undo
419 419
  */
420 420
 public function myFunction()
421 421
 {
422
-    if ($condition === FALSE) {
423
-        echo 'hi';
424
-    }
422
+	if ($condition === FALSE) {
423
+		echo 'hi';
424
+	}
425 425
 
426
-    return 'blah';
426
+	return 'blah';
427 427
 
428 428
 }//end myFunction()
429 429
 
@@ -441,12 +441,12 @@  discard block
 block discarded – undo
441 441
 function myFunction($arg1) {}
442 442
 
443 443
 class MyClass() {
444
-    /**
445
-     * An abstract function.
446
-     *
447
-     * @return string[]
448
-     */
449
-    abstract final protected function myFunction();
444
+	/**
445
+	 * An abstract function.
446
+	 *
447
+	 * @return string[]
448
+	 */
449
+	abstract final protected function myFunction();
450 450
 }
451 451
 
452 452
 /**
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 function test($test)
460 460
 {
461 461
    if ($test === TRUE) {
462
-       return;
462
+	   return;
463 463
    }
464 464
 
465 465
    return $test;
@@ -531,17 +531,17 @@  discard block
 block discarded – undo
531 531
 
532 532
 // Closures should be ignored.
533 533
 preg_replace_callback(
534
-    '~-([a-z])~',
535
-    function ($match) {
536
-        return strtoupper($match[1]);
537
-    },
538
-    'hello-world'
534
+	'~-([a-z])~',
535
+	function ($match) {
536
+		return strtoupper($match[1]);
537
+	},
538
+	'hello-world'
539 539
 );
540 540
 
541 541
 $callback = function ($bar) use ($foo)
542
-            {
543
-                $bar += $foo;
544
-            };
542
+			{
543
+				$bar += $foo;
544
+			};
545 545
 
546 546
 /**
547 547
  * Comment should end with '*', not '**' before the slash.
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
  */
575 575
 public function variableArgs($a1, $a2)
576 576
 {
577
-    return true;
577
+	return true;
578 578
 
579 579
 }//end variableArgs()
580 580
 
@@ -585,9 +585,9 @@  discard block
 block discarded – undo
585 585
  */
586 586
 public function containsClosure()
587 587
 {
588
-    function ($e) {
589
-        return new Event($e);
590
-    },
588
+	function ($e) {
589
+		return new Event($e);
590
+	},
591 591
 
592 592
 }//end containsClosure()
593 593
 
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
  * @return void
610 610
  */
611 611
 public function usesCallable(callable $cb) {
612
-    $cb();
612
+	$cb();
613 613
 }//end usesCallable()
614 614
 
615 615
 /**
@@ -648,18 +648,18 @@  discard block
 block discarded – undo
648 648
  * @return string
649 649
  */
650 650
 public function _() {
651
-    return $foo;
651
+	return $foo;
652 652
 }
653 653
 
654 654
 class Baz {
655
-    /**
656
-     * The PHP5 constructor
657
-     *
658
-     * No return tag
659
-     */
660
-    public function __construct() {
661
-
662
-    }
655
+	/**
656
+	 * The PHP5 constructor
657
+	 *
658
+	 * No return tag
659
+	 */
660
+	public function __construct() {
661
+
662
+	}
663 663
 }
664 664
 
665 665
 /**
@@ -677,9 +677,9 @@  discard block
 block discarded – undo
677 677
  */
678 678
 function yieldTest()
679 679
 {
680
-    for ($i = 0; $i < 5; $i++) {
681
-        yield $i;
682
-    }
680
+	for ($i = 0; $i < 5; $i++) {
681
+		yield $i;
682
+	}
683 683
 }
684 684
 
685 685
 /**
@@ -689,9 +689,9 @@  discard block
 block discarded – undo
689 689
  */
690 690
 function yieldTest()
691 691
 {
692
-    for ($i = 0; $i < 5; $i++) {
693
-        yield $i;
694
-    }
692
+	for ($i = 0; $i < 5; $i++) {
693
+		yield $i;
694
+	}
695 695
 }
696 696
 
697 697
 /**
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
  * @return integer This is a description.
759 759
  */
760 760
 public function myFunction() {
761
-    return 5;
761
+	return 5;
762 762
 }
763 763
 
764 764
 /**
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
  * @return int This is a description.
768 768
  */
769 769
 public function myFunction() {
770
-    return 5;
770
+	return 5;
771 771
 }
772 772
 
773 773
 /**
@@ -808,18 +808,18 @@  discard block
 block discarded – undo
808 808
  */
809 809
 public function someFunc(): void
810 810
 {
811
-    $class = new class
812
-    {
813
-        /**
814
-         * Do something.
815
-         *
816
-         * @return string
817
-         */
818
-        public function getString(): string
819
-        {
820
-            return 'some string';
821
-        }
822
-    };
811
+	$class = new class
812
+	{
813
+		/**
814
+		 * Do something.
815
+		 *
816
+		 * @return string
817
+		 */
818
+		public function getString(): string
819
+		{
820
+			return 'some string';
821
+		}
822
+	};
823 823
 }
824 824
 
825 825
 /**
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
  */
830 830
 function returnTypeWithDescriptionA()
831 831
 {
832
-    return 5;
832
+	return 5;
833 833
 
834 834
 }//end returnTypeWithDescriptionA()
835 835
 
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
  */
842 842
 function returnTypeWithDescriptionB()
843 843
 {
844
-    return 5;
844
+	return 5;
845 845
 
846 846
 }//end returnTypeWithDescriptionB()
847 847
 
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
  */
854 854
 function returnTypeWithDescriptionC()
855 855
 {
856
-    return 5;
856
+	return 5;
857 857
 
858 858
 }//end returnTypeWithDescriptionC()
859 859
 
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
  */
876 876
 function yieldFromTest()
877 877
 {
878
-    yield from foo();
878
+	yield from foo();
879 879
 }
880 880
 
881 881
 /**
@@ -891,12 +891,12 @@  discard block
 block discarded – undo
891 891
  * @return string
892 892
  */
893 893
 function audio(
894
-    $src,
895
-    $unsupportedMessage = '',
896
-    $attributes = '',
894
+	$src,
895
+	$unsupportedMessage = '',
896
+	$attributes = '',
897 897
 )
898 898
 {
899
-    return 'test';
899
+	return 'test';
900 900
 }
901 901
 
902 902
 /**
@@ -906,11 +906,11 @@  discard block
 block discarded – undo
906 906
  */
907 907
 function returnArrayWithClosure()
908 908
 {
909
-    function () {
910
-        return;
911
-    };
909
+	function () {
910
+		return;
911
+	};
912 912
 
913
-    return [];
913
+	return [];
914 914
 }
915 915
 
916 916
 /**
@@ -920,16 +920,16 @@  discard block
 block discarded – undo
920 920
  */
921 921
 function returnArrayWithAnonymousClass()
922 922
 {
923
-    new class {
924
-        /**
925
-         * @return void
926
-         */
927
-        public function test() {
928
-            return;
929
-        }
930
-    };
931
-
932
-    return [];
923
+	new class {
924
+		/**
925
+		 * @return void
926
+		 */
927
+		public function test() {
928
+			return;
929
+		}
930
+	};
931
+
932
+	return [];
933 933
 }
934 934
 
935 935
 /**
@@ -937,9 +937,9 @@  discard block
 block discarded – undo
937 937
  */
938 938
 function returnVoidWithClosure()
939 939
 {
940
-    function () {
941
-        return 1;
942
-    };
940
+	function () {
941
+		return 1;
942
+	};
943 943
 }
944 944
 
945 945
 /**
@@ -947,28 +947,28 @@  discard block
 block discarded – undo
947 947
  */
948 948
 function returnVoidWithAnonymousClass()
949 949
 {
950
-    new class {
951
-        /**
952
-         * @return integer
953
-         */
954
-        public function test()
955
-        {
956
-            return 1;
957
-        }
958
-    };
950
+	new class {
951
+		/**
952
+		 * @return integer
953
+		 */
954
+		public function test()
955
+		{
956
+			return 1;
957
+		}
958
+	};
959 959
 }
960 960
 
961 961
 class TestReturnVoid
962 962
 {
963
-    /**
964
-     * @return void
965
-     */
966
-    public function test()
967
-    {
968
-        function () {
969
-            return 4;
970
-        };
971
-    }
963
+	/**
964
+	 * @return void
965
+	 */
966
+	public function test()
967
+	{
968
+		function () {
969
+			return 4;
970
+		};
971
+	}
972 972
 }
973 973
 
974 974
 /**
@@ -1024,12 +1024,12 @@  discard block
 block discarded – undo
1024 1024
 
1025 1025
 // phpcs:set Squiz.Commenting.FunctionComment specialMethods[]
1026 1026
 class Bar {
1027
-    /**
1028
-     * The PHP5 constructor
1029
-     */
1030
-    public function __construct() {
1027
+	/**
1028
+	 * The PHP5 constructor
1029
+	 */
1030
+	public function __construct() {
1031 1031
 
1032
-    }
1032
+	}
1033 1033
 }
1034 1034
 
1035 1035
 // phpcs:set Squiz.Commenting.FunctionComment specialMethods[] ignored
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      *
26 26
      * @return array<int, int>
27 27
      */
28
-    public function getErrorList($testFile='FileCommentUnitTest.inc')
28
+    public function getErrorList($testFile = 'FileCommentUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31 31
         case 'FileCommentUnitTest.1.inc':
Please login to merge, or discard this patch.
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -15,62 +15,62 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @param string $testFile The name of the file being tested.
25
-     *
26
-     * @return array<int, int>
27
-     */
28
-    public function getErrorList($testFile='FileCommentUnitTest.inc')
29
-    {
30
-        switch ($testFile) {
31
-        case 'FileCommentUnitTest.1.inc':
32
-        case 'FileCommentUnitTest.1.js':
33
-            return [
34
-                1  => 1,
35
-                22 => 2,
36
-                23 => 1,
37
-                24 => 2,
38
-                25 => 2,
39
-                26 => 1,
40
-                27 => 2,
41
-                28 => 2,
42
-                32 => 2,
43
-            ];
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @param string $testFile The name of the file being tested.
25
+	 *
26
+	 * @return array<int, int>
27
+	 */
28
+	public function getErrorList($testFile='FileCommentUnitTest.inc')
29
+	{
30
+		switch ($testFile) {
31
+		case 'FileCommentUnitTest.1.inc':
32
+		case 'FileCommentUnitTest.1.js':
33
+			return [
34
+				1  => 1,
35
+				22 => 2,
36
+				23 => 1,
37
+				24 => 2,
38
+				25 => 2,
39
+				26 => 1,
40
+				27 => 2,
41
+				28 => 2,
42
+				32 => 2,
43
+			];
44 44
 
45
-        case 'FileCommentUnitTest.4.inc':
46
-        case 'FileCommentUnitTest.6.inc':
47
-        case 'FileCommentUnitTest.7.inc':
48
-        case 'FileCommentUnitTest.9.inc':
49
-            return [1 => 1];
45
+		case 'FileCommentUnitTest.4.inc':
46
+		case 'FileCommentUnitTest.6.inc':
47
+		case 'FileCommentUnitTest.7.inc':
48
+		case 'FileCommentUnitTest.9.inc':
49
+			return [1 => 1];
50 50
 
51
-        case 'FileCommentUnitTest.5.inc':
52
-            return [2 => 1];
51
+		case 'FileCommentUnitTest.5.inc':
52
+			return [2 => 1];
53 53
 
54
-        default:
55
-            return [];
56
-        }//end switch
54
+		default:
55
+			return [];
56
+		}//end switch
57 57
 
58
-    }//end getErrorList()
58
+	}//end getErrorList()
59 59
 
60 60
 
61
-    /**
62
-     * Returns the lines where warnings should occur.
63
-     *
64
-     * The key of the array should represent the line number and the value
65
-     * should represent the number of warnings that should occur on that line.
66
-     *
67
-     * @return array<int, int>
68
-     */
69
-    public function getWarningList()
70
-    {
71
-        return [];
61
+	/**
62
+	 * Returns the lines where warnings should occur.
63
+	 *
64
+	 * The key of the array should represent the line number and the value
65
+	 * should represent the number of warnings that should occur on that line.
66
+	 *
67
+	 * @return array<int, int>
68
+	 */
69
+	public function getWarningList()
70
+	{
71
+		return [];
72 72
 
73
-    }//end getWarningList()
73
+	}//end getWarningList()
74 74
 
75 75
 
76 76
 }//end class
Please login to merge, or discard this patch.
Switch Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -28,31 +28,31 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='FileCommentUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'FileCommentUnitTest.1.inc':
32
-        case 'FileCommentUnitTest.1.js':
33
-            return [
34
-                1  => 1,
35
-                22 => 2,
36
-                23 => 1,
37
-                24 => 2,
38
-                25 => 2,
39
-                26 => 1,
40
-                27 => 2,
41
-                28 => 2,
42
-                32 => 2,
43
-            ];
31
+        	case 'FileCommentUnitTest.1.inc':
32
+        	case 'FileCommentUnitTest.1.js':
33
+            	return [
34
+                	1  => 1,
35
+                	22 => 2,
36
+                	23 => 1,
37
+                	24 => 2,
38
+                	25 => 2,
39
+                	26 => 1,
40
+                	27 => 2,
41
+                	28 => 2,
42
+                	32 => 2,
43
+            	];
44 44
 
45
-        case 'FileCommentUnitTest.4.inc':
46
-        case 'FileCommentUnitTest.6.inc':
47
-        case 'FileCommentUnitTest.7.inc':
48
-        case 'FileCommentUnitTest.9.inc':
49
-            return [1 => 1];
45
+        	case 'FileCommentUnitTest.4.inc':
46
+        	case 'FileCommentUnitTest.6.inc':
47
+        	case 'FileCommentUnitTest.7.inc':
48
+        	case 'FileCommentUnitTest.9.inc':
49
+            	return [1 => 1];
50 50
 
51
-        case 'FileCommentUnitTest.5.inc':
52
-            return [2 => 1];
51
+        	case 'FileCommentUnitTest.5.inc':
52
+            	return [2 => 1];
53 53
 
54
-        default:
55
-            return [];
54
+        	default:
55
+            	return [];
56 56
         }//end switch
57 57
 
58 58
     }//end getErrorList()
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -15,46 +15,46 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @return array<int, int>
25
-     */
26
-    public function getErrorList()
27
-    {
28
-        return [
29
-            9   => 1,
30
-            21  => 1,
31
-            35  => 1,
32
-            47  => 1,
33
-            61  => 2,
34
-            106 => 1,
35
-            123 => 1,
36
-            200 => 1,
37
-            219 => 1,
38
-            287 => 1,
39
-            397 => 1,
40
-        ];
41
-
42
-    }//end getErrorList()
43
-
44
-
45
-    /**
46
-     * Returns the lines where warnings should occur.
47
-     *
48
-     * The key of the array should represent the line number and the value
49
-     * should represent the number of warnings that should occur on that line.
50
-     *
51
-     * @return array<int, int>
52
-     */
53
-    public function getWarningList()
54
-    {
55
-        return [];
56
-
57
-    }//end getWarningList()
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @return array<int, int>
25
+	 */
26
+	public function getErrorList()
27
+	{
28
+		return [
29
+			9   => 1,
30
+			21  => 1,
31
+			35  => 1,
32
+			47  => 1,
33
+			61  => 2,
34
+			106 => 1,
35
+			123 => 1,
36
+			200 => 1,
37
+			219 => 1,
38
+			287 => 1,
39
+			397 => 1,
40
+		];
41
+
42
+	}//end getErrorList()
43
+
44
+
45
+	/**
46
+	 * Returns the lines where warnings should occur.
47
+	 *
48
+	 * The key of the array should represent the line number and the value
49
+	 * should represent the number of warnings that should occur on that line.
50
+	 *
51
+	 * @return array<int, int>
52
+	 */
53
+	public function getWarningList()
54
+	{
55
+		return [];
56
+
57
+	}//end getWarningList()
58 58
 
59 59
 
60 60
 }//end class
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -15,38 +15,38 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @return array<int, int>
25
-     */
26
-    public function getErrorList()
27
-    {
28
-        return [
29
-            4  => 1,
30
-            8  => 1,
31
-            28 => 1,
32
-        ];
33
-
34
-    }//end getErrorList()
35
-
36
-
37
-    /**
38
-     * Returns the lines where warnings should occur.
39
-     *
40
-     * The key of the array should represent the line number and the value
41
-     * should represent the number of warnings that should occur on that line.
42
-     *
43
-     * @return array<int, int>
44
-     */
45
-    public function getWarningList()
46
-    {
47
-        return [];
48
-
49
-    }//end getWarningList()
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @return array<int, int>
25
+	 */
26
+	public function getErrorList()
27
+	{
28
+		return [
29
+			4  => 1,
30
+			8  => 1,
31
+			28 => 1,
32
+		];
33
+
34
+	}//end getErrorList()
35
+
36
+
37
+	/**
38
+	 * Returns the lines where warnings should occur.
39
+	 *
40
+	 * The key of the array should represent the line number and the value
41
+	 * should represent the number of warnings that should occur on that line.
42
+	 *
43
+	 * @return array<int, int>
44
+	 */
45
+	public function getWarningList()
46
+	{
47
+		return [];
48
+
49
+	}//end getWarningList()
50 50
 
51 51
 
52 52
 }//end class
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.inc 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 {
57 57
 }//end class
58 58
 
59
-class ClassOne implements ClassFour   ,ClassFive,  ClassSix
59
+class ClassOne implements ClassFour, ClassFive, ClassSix
60 60
 {
61 61
 }//end class
62 62
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 } // phpcs:enable Standard.Category.Sniff
84 84
 
85
-class File implements \Zend_Auth_Storage_Interface,\Zend_Auth_Storage,  \Zend_Foo
85
+class File implements \Zend_Auth_Storage_Interface, \Zend_Auth_Storage, \Zend_Foo
86 86
 {
87 87
 }
88 88
 
@@ -107,4 +107,4 @@  discard block
 block discarded – undo
107 107
 class IncorrectCodeBeforeClosingBrace
108 108
 {
109 109
 
110
-echo phpinfo();}
110
+echo phpinfo(); }
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 class IncorrectBracePlacementWithImplements implements correctClassDeclaration {}
25 25
 
26 26
 
27
-    class IncorrectIndentedClass
28
-    {
27
+	class IncorrectIndentedClass
28
+	{
29 29
 
30
-    }//end class
30
+	}//end class
31 31
 
32 32
 
33 33
 // Incorrect code placement for opening/closing brace.
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 echo phpinfo(); }
49 49
 
50
-    class IncorrectIndentedClass
50
+	class IncorrectIndentedClass
51 51
 {
52 52
 
53 53
 }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 class MyClass2
98 98
 {
99
-    var $x;
99
+	var $x;
100 100
 }
101 101
 
102 102
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function SelfMemberReferenceUnitTestExample()
15 15
     {
16
-        $testResults =& $this->testResults;
16
+        $testResults = & $this->testResults;
17 17
 
18 18
 
19 19
         // Correct call to self.
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                         MyClass::test($value);
58 58
                     };
59 59
 
60
-        $array = array(1,2,3);
60
+        $array = array(1, 2, 3);
61 61
         array_walk($array, $callback);
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
Indentation   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -5,54 +5,54 @@  discard block
 block discarded – undo
5 5
 {
6 6
 
7 7
 
8
-    private $testCount = 0;
8
+	private $testCount = 0;
9 9
 
10 10
 
11
-    private $testResults = array();
11
+	private $testResults = array();
12 12
 
13 13
 
14
-    public function SelfMemberReferenceUnitTestExample()
15
-    {
16
-        $testResults =& $this->testResults;
14
+	public function SelfMemberReferenceUnitTestExample()
15
+	{
16
+		$testResults =& $this->testResults;
17 17
 
18 18
 
19
-        // Correct call to self.
20
-        $testResults[] = self::selfMemberReferenceUnitTestFunction();
21
-        $testResults[] = parent::selfMemberReferenceUnitTestFunction();
19
+		// Correct call to self.
20
+		$testResults[] = self::selfMemberReferenceUnitTestFunction();
21
+		$testResults[] = parent::selfMemberReferenceUnitTestFunction();
22 22
 
23
-        // Incorrect case.
24
-        $testResults[] = Self::selfMemberReferenceUnitTestFunction();
25
-        $testResults[] = SELF::selfMemberReferenceUnitTestFunction();
26
-        $testResults[] = SelfMemberReferenceUnitTestExample::selfMemberReferenceUnitTestFunction();
23
+		// Incorrect case.
24
+		$testResults[] = Self::selfMemberReferenceUnitTestFunction();
25
+		$testResults[] = SELF::selfMemberReferenceUnitTestFunction();
26
+		$testResults[] = SelfMemberReferenceUnitTestExample::selfMemberReferenceUnitTestFunction();
27 27
 
28 28
 
29
-        // Incorrect spacing.
30
-        $testResults[] = self ::selfMemberReferenceUnitTestFunction();
31
-        $testResults[] = self::  selfMemberReferenceUnitTestFunction();
32
-        $testResults[] = self  :: selfMemberReferenceUnitTestFunction();
29
+		// Incorrect spacing.
30
+		$testResults[] = self ::selfMemberReferenceUnitTestFunction();
31
+		$testResults[] = self::  selfMemberReferenceUnitTestFunction();
32
+		$testResults[] = self  :: selfMemberReferenceUnitTestFunction();
33 33
 
34
-        // Remove ALL the newlines
35
-        $testResults[] = self
34
+		// Remove ALL the newlines
35
+		$testResults[] = self
36 36
 
37 37
 
38 38
 
39 39
 
40
-            ::
40
+			::
41 41
 
42 42
 
43 43
 
44 44
 
45
-            selfMemberReferenceUnitTestFunction();
45
+			selfMemberReferenceUnitTestFunction();
46 46
 
47
-    }
47
+	}
48 48
 
49 49
 
50
-    function selfMemberReferenceUnitTestFunction()
51
-    {
52
-        $this->testCount = $this->testCount + 1;
53
-        return $this->testCount;
50
+	function selfMemberReferenceUnitTestFunction()
51
+	{
52
+		$this->testCount = $this->testCount + 1;
53
+		return $this->testCount;
54 54
 
55
-    }
55
+	}
56 56
 
57 57
 
58 58
 }
@@ -60,115 +60,115 @@  discard block
 block discarded – undo
60 60
 
61 61
 class MyClass {
62 62
 
63
-    public static function test($value) {
64
-        echo "$value\n";
65
-    }
63
+	public static function test($value) {
64
+		echo "$value\n";
65
+	}
66 66
 
67
-    public static function walk() {
68
-        $callback = function($value, $key) {
69
-                        // This is valid because you can't use self:: in a closure.
70
-                        MyClass::test($value);
71
-                    };
67
+	public static function walk() {
68
+		$callback = function($value, $key) {
69
+						// This is valid because you can't use self:: in a closure.
70
+						MyClass::test($value);
71
+					};
72 72
 
73
-        $array = array(1,2,3);
74
-        array_walk($array, $callback);
75
-    }
73
+		$array = array(1,2,3);
74
+		array_walk($array, $callback);
75
+	}
76 76
 }
77 77
 
78 78
 MyClass::walk();
79 79
 
80 80
 class Controller
81 81
 {
82
-    public function Action()
83
-    {
84
-        Doctrine\Common\Util\Debug::dump();
85
-    }
82
+	public function Action()
83
+	{
84
+		Doctrine\Common\Util\Debug::dump();
85
+	}
86 86
 }
87 87
 
88 88
 class Foo
89 89
 {
90
-    public static function bar()
91
-    {
92
-        \Foo::baz();
93
-    }
90
+	public static function bar()
91
+	{
92
+		\Foo::baz();
93
+	}
94 94
 }
95 95
 
96 96
 namespace TYPO3\CMS\Reports;
97 97
 
98 98
 class Status {
99
-    const NOTICE = -2;
100
-    const INFO = -1;
101
-    const OK = 0;
102
-    const WARNING = 1;
103
-    const ERROR = 2;
99
+	const NOTICE = -2;
100
+	const INFO = -1;
101
+	const OK = 0;
102
+	const WARNING = 1;
103
+	const ERROR = 2;
104 104
 }
105 105
 
106 106
 namespace TYPO3\CMS\Reports\Report\Status;
107 107
 
108 108
 class Status implements \TYPO3\CMS\Reports\ReportInterface {
109
-    public function getHighestSeverity(array $statusCollection) {
110
-        $highestSeverity = \TYPO3\CMS\Reports\Status::NOTICE;
111
-    }
109
+	public function getHighestSeverity(array $statusCollection) {
110
+		$highestSeverity = \TYPO3\CMS\Reports\Status::NOTICE;
111
+	}
112 112
 }
113 113
 
114 114
 namespace Foo;
115 115
 
116 116
 class Bar {
117 117
 
118
-    function myFunction()
119
-    {
120
-        \Foo\Whatever::something();
121
-        \Foo\Bar::something();
122
-    }
118
+	function myFunction()
119
+	{
120
+		\Foo\Whatever::something();
121
+		\Foo\Bar::something();
122
+	}
123 123
 }
124 124
 
125 125
 namespace Foo\Bar;
126 126
 
127 127
 class Baz {
128 128
 
129
-    function myFunction()
130
-    {
131
-        \Foo\Bar\Whatever::something();
132
-        \Foo\Bar\Baz::something();
133
-    }
129
+	function myFunction()
130
+	{
131
+		\Foo\Bar\Whatever::something();
132
+		\Foo\Bar\Baz::something();
133
+	}
134 134
 }
135 135
 
136 136
 class Nested_Anon_Class {
137
-    public function getAnonymousClass() {
138
-        // Spacing/comments should not cause false negatives for the NotUsed error.
139
-        Nested_Anon_Class      ::       $prop;
140
-        Nested_Anon_Class
141
-        /* some comment */
142
-
143
-        ::
144
-
145
-        // phpcs:ignore Standard.Category.SniffName -- for reasons.
146
-        Bar();
147
-
148
-        // Anonymous class is a different scope.
149
-        return new class() {
150
-            public function nested_function() {
151
-                Nested_Anon_Class::$prop;
152
-                Nested_Anon_Class::BAR;
153
-            }
154
-        };
155
-    }
137
+	public function getAnonymousClass() {
138
+		// Spacing/comments should not cause false negatives for the NotUsed error.
139
+		Nested_Anon_Class      ::       $prop;
140
+		Nested_Anon_Class
141
+		/* some comment */
142
+
143
+		::
144
+
145
+		// phpcs:ignore Standard.Category.SniffName -- for reasons.
146
+		Bar();
147
+
148
+		// Anonymous class is a different scope.
149
+		return new class() {
150
+			public function nested_function() {
151
+				Nested_Anon_Class::$prop;
152
+				Nested_Anon_Class::BAR;
153
+			}
154
+		};
155
+	}
156 156
 }
157 157
 
158 158
 // Test dealing with scoped namespaces.
159 159
 namespace Foo\Baz {
160
-    class BarFoo {
161
-        public function foo() {
162
-            echo Foo\Baz\BarFoo::$prop;
163
-        }
164
-    }
160
+	class BarFoo {
161
+		public function foo() {
162
+			echo Foo\Baz\BarFoo::$prop;
163
+		}
164
+	}
165 165
 }
166 166
 
167 167
 // Prevent false negative when namespace has whitespace/comments.
168 168
 namespace Foo /*comment*/ \ Bah {
169
-    class BarFoo {
170
-        public function foo() {
171
-            echo Foo \ /*comment*/ Bah\BarFoo::$prop;
172
-        }
173
-    }
169
+	class BarFoo {
170
+		public function foo() {
171
+			echo Foo \ /*comment*/ Bah\BarFoo::$prop;
172
+		}
173
+	}
174 174
 }
Please login to merge, or discard this patch.