Completed
Pull Request — develop (#1492)
by Zack
15:57
created
vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractVariableSniff.php 1 patch
Indentation   +204 added lines, -204 removed lines patch added patch discarded remove patch
@@ -22,210 +22,210 @@
 block discarded – undo
22 22
 {
23 23
 
24 24
 
25
-    /**
26
-     * List of PHP Reserved variables.
27
-     *
28
-     * Used by various naming convention sniffs.
29
-     *
30
-     * @var array
31
-     */
32
-    protected $phpReservedVars = [
33
-        '_SERVER'              => true,
34
-        '_GET'                 => true,
35
-        '_POST'                => true,
36
-        '_REQUEST'             => true,
37
-        '_SESSION'             => true,
38
-        '_ENV'                 => true,
39
-        '_COOKIE'              => true,
40
-        '_FILES'               => true,
41
-        'GLOBALS'              => true,
42
-        'http_response_header' => true,
43
-        'HTTP_RAW_POST_DATA'   => true,
44
-        'php_errormsg'         => true,
45
-    ];
46
-
47
-
48
-    /**
49
-     * Constructs an AbstractVariableTest.
50
-     */
51
-    public function __construct()
52
-    {
53
-        $scopes = Tokens::$ooScopeTokens;
54
-
55
-        $listen = [
56
-            T_VARIABLE,
57
-            T_DOUBLE_QUOTED_STRING,
58
-            T_HEREDOC,
59
-        ];
60
-
61
-        parent::__construct($scopes, $listen, true);
62
-
63
-    }//end __construct()
64
-
65
-
66
-    /**
67
-     * Processes the token in the specified PHP_CodeSniffer\Files\File.
68
-     *
69
-     * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
70
-     *                                               token was found.
71
-     * @param int                         $stackPtr  The position where the token was found.
72
-     * @param int                         $currScope The current scope opener token.
73
-     *
74
-     * @return void|int Optionally returns a stack pointer. The sniff will not be
75
-     *                  called again on the current file until the returned stack
76
-     *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
77
-     *                  the rest of the file.
78
-     */
79
-    final protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope)
80
-    {
81
-        $tokens = $phpcsFile->getTokens();
82
-
83
-        if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING
84
-            || $tokens[$stackPtr]['code'] === T_HEREDOC
85
-        ) {
86
-            // Check to see if this string has a variable in it.
87
-            $pattern = '|(?<!\\\\)(?:\\\\{2})*\${?[a-zA-Z0-9_]+}?|';
88
-            if (preg_match($pattern, $tokens[$stackPtr]['content']) !== 0) {
89
-                return $this->processVariableInString($phpcsFile, $stackPtr);
90
-            }
91
-
92
-            return;
93
-        }
94
-
95
-        // If this token is nested inside a function at a deeper
96
-        // level than the current OO scope that was found, it's a normal
97
-        // variable and not a member var.
98
-        $conditions = array_reverse($tokens[$stackPtr]['conditions'], true);
99
-        $inFunction = false;
100
-        foreach ($conditions as $scope => $code) {
101
-            if (isset(Tokens::$ooScopeTokens[$code]) === true) {
102
-                break;
103
-            }
104
-
105
-            if ($code === T_FUNCTION || $code === T_CLOSURE) {
106
-                $inFunction = true;
107
-            }
108
-        }
109
-
110
-        if ($scope !== $currScope) {
111
-            // We found a closer scope to this token, so ignore
112
-            // this particular time through the sniff. We will process
113
-            // this token when this closer scope is found to avoid
114
-            // duplicate checks.
115
-            return;
116
-        }
117
-
118
-        // Just make sure this isn't a variable in a function declaration.
119
-        if ($inFunction === false && isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
120
-            foreach ($tokens[$stackPtr]['nested_parenthesis'] as $opener => $closer) {
121
-                if (isset($tokens[$opener]['parenthesis_owner']) === false) {
122
-                    // Check if this is a USE statement for a closure.
123
-                    $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($opener - 1), null, true);
124
-                    if ($tokens[$prev]['code'] === T_USE) {
125
-                        $inFunction = true;
126
-                        break;
127
-                    }
128
-
129
-                    continue;
130
-                }
131
-
132
-                $owner = $tokens[$opener]['parenthesis_owner'];
133
-                if ($tokens[$owner]['code'] === T_FUNCTION
134
-                    || $tokens[$owner]['code'] === T_CLOSURE
135
-                ) {
136
-                    $inFunction = true;
137
-                    break;
138
-                }
139
-            }
140
-        }//end if
141
-
142
-        if ($inFunction === true) {
143
-            return $this->processVariable($phpcsFile, $stackPtr);
144
-        } else {
145
-            return $this->processMemberVar($phpcsFile, $stackPtr);
146
-        }
147
-
148
-    }//end processTokenWithinScope()
149
-
150
-
151
-    /**
152
-     * Processes the token outside the scope in the file.
153
-     *
154
-     * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
155
-     *                                               token was found.
156
-     * @param int                         $stackPtr  The position where the token was found.
157
-     *
158
-     * @return void|int Optionally returns a stack pointer. The sniff will not be
159
-     *                  called again on the current file until the returned stack
160
-     *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
161
-     *                  the rest of the file.
162
-     */
163
-    final protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)
164
-    {
165
-        $tokens = $phpcsFile->getTokens();
166
-        // These variables are not member vars.
167
-        if ($tokens[$stackPtr]['code'] === T_VARIABLE) {
168
-            return $this->processVariable($phpcsFile, $stackPtr);
169
-        } else if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING
170
-            || $tokens[$stackPtr]['code'] === T_HEREDOC
171
-        ) {
172
-            // Check to see if this string has a variable in it.
173
-            $pattern = '|(?<!\\\\)(?:\\\\{2})*\${?[a-zA-Z0-9_]+}?|';
174
-            if (preg_match($pattern, $tokens[$stackPtr]['content']) !== 0) {
175
-                return $this->processVariableInString($phpcsFile, $stackPtr);
176
-            }
177
-        }
178
-
179
-    }//end processTokenOutsideScope()
180
-
181
-
182
-    /**
183
-     * Called to process class member vars.
184
-     *
185
-     * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
186
-     *                                               token was found.
187
-     * @param int                         $stackPtr  The position where the token was found.
188
-     *
189
-     * @return void|int Optionally returns a stack pointer. The sniff will not be
190
-     *                  called again on the current file until the returned stack
191
-     *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
192
-     *                  the rest of the file.
193
-     */
194
-    abstract protected function processMemberVar(File $phpcsFile, $stackPtr);
195
-
196
-
197
-    /**
198
-     * Called to process normal member vars.
199
-     *
200
-     * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
201
-     *                                               token was found.
202
-     * @param int                         $stackPtr  The position where the token was found.
203
-     *
204
-     * @return void|int Optionally returns a stack pointer. The sniff will not be
205
-     *                  called again on the current file until the returned stack
206
-     *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
207
-     *                  the rest of the file.
208
-     */
209
-    abstract protected function processVariable(File $phpcsFile, $stackPtr);
210
-
211
-
212
-    /**
213
-     * Called to process variables found in double quoted strings or heredocs.
214
-     *
215
-     * Note that there may be more than one variable in the string, which will
216
-     * result only in one call for the string or one call per line for heredocs.
217
-     *
218
-     * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
219
-     *                                               token was found.
220
-     * @param int                         $stackPtr  The position where the double quoted
221
-     *                                               string was found.
222
-     *
223
-     * @return void|int Optionally returns a stack pointer. The sniff will not be
224
-     *                  called again on the current file until the returned stack
225
-     *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
226
-     *                  the rest of the file.
227
-     */
228
-    abstract protected function processVariableInString(File $phpcsFile, $stackPtr);
25
+	/**
26
+	 * List of PHP Reserved variables.
27
+	 *
28
+	 * Used by various naming convention sniffs.
29
+	 *
30
+	 * @var array
31
+	 */
32
+	protected $phpReservedVars = [
33
+		'_SERVER'              => true,
34
+		'_GET'                 => true,
35
+		'_POST'                => true,
36
+		'_REQUEST'             => true,
37
+		'_SESSION'             => true,
38
+		'_ENV'                 => true,
39
+		'_COOKIE'              => true,
40
+		'_FILES'               => true,
41
+		'GLOBALS'              => true,
42
+		'http_response_header' => true,
43
+		'HTTP_RAW_POST_DATA'   => true,
44
+		'php_errormsg'         => true,
45
+	];
46
+
47
+
48
+	/**
49
+	 * Constructs an AbstractVariableTest.
50
+	 */
51
+	public function __construct()
52
+	{
53
+		$scopes = Tokens::$ooScopeTokens;
54
+
55
+		$listen = [
56
+			T_VARIABLE,
57
+			T_DOUBLE_QUOTED_STRING,
58
+			T_HEREDOC,
59
+		];
60
+
61
+		parent::__construct($scopes, $listen, true);
62
+
63
+	}//end __construct()
64
+
65
+
66
+	/**
67
+	 * Processes the token in the specified PHP_CodeSniffer\Files\File.
68
+	 *
69
+	 * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
70
+	 *                                               token was found.
71
+	 * @param int                         $stackPtr  The position where the token was found.
72
+	 * @param int                         $currScope The current scope opener token.
73
+	 *
74
+	 * @return void|int Optionally returns a stack pointer. The sniff will not be
75
+	 *                  called again on the current file until the returned stack
76
+	 *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
77
+	 *                  the rest of the file.
78
+	 */
79
+	final protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope)
80
+	{
81
+		$tokens = $phpcsFile->getTokens();
82
+
83
+		if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING
84
+			|| $tokens[$stackPtr]['code'] === T_HEREDOC
85
+		) {
86
+			// Check to see if this string has a variable in it.
87
+			$pattern = '|(?<!\\\\)(?:\\\\{2})*\${?[a-zA-Z0-9_]+}?|';
88
+			if (preg_match($pattern, $tokens[$stackPtr]['content']) !== 0) {
89
+				return $this->processVariableInString($phpcsFile, $stackPtr);
90
+			}
91
+
92
+			return;
93
+		}
94
+
95
+		// If this token is nested inside a function at a deeper
96
+		// level than the current OO scope that was found, it's a normal
97
+		// variable and not a member var.
98
+		$conditions = array_reverse($tokens[$stackPtr]['conditions'], true);
99
+		$inFunction = false;
100
+		foreach ($conditions as $scope => $code) {
101
+			if (isset(Tokens::$ooScopeTokens[$code]) === true) {
102
+				break;
103
+			}
104
+
105
+			if ($code === T_FUNCTION || $code === T_CLOSURE) {
106
+				$inFunction = true;
107
+			}
108
+		}
109
+
110
+		if ($scope !== $currScope) {
111
+			// We found a closer scope to this token, so ignore
112
+			// this particular time through the sniff. We will process
113
+			// this token when this closer scope is found to avoid
114
+			// duplicate checks.
115
+			return;
116
+		}
117
+
118
+		// Just make sure this isn't a variable in a function declaration.
119
+		if ($inFunction === false && isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
120
+			foreach ($tokens[$stackPtr]['nested_parenthesis'] as $opener => $closer) {
121
+				if (isset($tokens[$opener]['parenthesis_owner']) === false) {
122
+					// Check if this is a USE statement for a closure.
123
+					$prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($opener - 1), null, true);
124
+					if ($tokens[$prev]['code'] === T_USE) {
125
+						$inFunction = true;
126
+						break;
127
+					}
128
+
129
+					continue;
130
+				}
131
+
132
+				$owner = $tokens[$opener]['parenthesis_owner'];
133
+				if ($tokens[$owner]['code'] === T_FUNCTION
134
+					|| $tokens[$owner]['code'] === T_CLOSURE
135
+				) {
136
+					$inFunction = true;
137
+					break;
138
+				}
139
+			}
140
+		}//end if
141
+
142
+		if ($inFunction === true) {
143
+			return $this->processVariable($phpcsFile, $stackPtr);
144
+		} else {
145
+			return $this->processMemberVar($phpcsFile, $stackPtr);
146
+		}
147
+
148
+	}//end processTokenWithinScope()
149
+
150
+
151
+	/**
152
+	 * Processes the token outside the scope in the file.
153
+	 *
154
+	 * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
155
+	 *                                               token was found.
156
+	 * @param int                         $stackPtr  The position where the token was found.
157
+	 *
158
+	 * @return void|int Optionally returns a stack pointer. The sniff will not be
159
+	 *                  called again on the current file until the returned stack
160
+	 *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
161
+	 *                  the rest of the file.
162
+	 */
163
+	final protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)
164
+	{
165
+		$tokens = $phpcsFile->getTokens();
166
+		// These variables are not member vars.
167
+		if ($tokens[$stackPtr]['code'] === T_VARIABLE) {
168
+			return $this->processVariable($phpcsFile, $stackPtr);
169
+		} else if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING
170
+			|| $tokens[$stackPtr]['code'] === T_HEREDOC
171
+		) {
172
+			// Check to see if this string has a variable in it.
173
+			$pattern = '|(?<!\\\\)(?:\\\\{2})*\${?[a-zA-Z0-9_]+}?|';
174
+			if (preg_match($pattern, $tokens[$stackPtr]['content']) !== 0) {
175
+				return $this->processVariableInString($phpcsFile, $stackPtr);
176
+			}
177
+		}
178
+
179
+	}//end processTokenOutsideScope()
180
+
181
+
182
+	/**
183
+	 * Called to process class member vars.
184
+	 *
185
+	 * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
186
+	 *                                               token was found.
187
+	 * @param int                         $stackPtr  The position where the token was found.
188
+	 *
189
+	 * @return void|int Optionally returns a stack pointer. The sniff will not be
190
+	 *                  called again on the current file until the returned stack
191
+	 *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
192
+	 *                  the rest of the file.
193
+	 */
194
+	abstract protected function processMemberVar(File $phpcsFile, $stackPtr);
195
+
196
+
197
+	/**
198
+	 * Called to process normal member vars.
199
+	 *
200
+	 * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
201
+	 *                                               token was found.
202
+	 * @param int                         $stackPtr  The position where the token was found.
203
+	 *
204
+	 * @return void|int Optionally returns a stack pointer. The sniff will not be
205
+	 *                  called again on the current file until the returned stack
206
+	 *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
207
+	 *                  the rest of the file.
208
+	 */
209
+	abstract protected function processVariable(File $phpcsFile, $stackPtr);
210
+
211
+
212
+	/**
213
+	 * Called to process variables found in double quoted strings or heredocs.
214
+	 *
215
+	 * Note that there may be more than one variable in the string, which will
216
+	 * result only in one call for the string or one call per line for heredocs.
217
+	 *
218
+	 * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this
219
+	 *                                               token was found.
220
+	 * @param int                         $stackPtr  The position where the double quoted
221
+	 *                                               string was found.
222
+	 *
223
+	 * @return void|int Optionally returns a stack pointer. The sniff will not be
224
+	 *                  called again on the current file until the returned stack
225
+	 *                  pointer is reached. Return ($phpcsFile->numTokens + 1) to skip
226
+	 *                  the rest of the file.
227
+	 */
228
+	abstract protected function processVariableInString(File $phpcsFile, $stackPtr);
229 229
 
230 230
 
231 231
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.inc 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	$var2;
57 57
 
58 58
 if ( (string) // phpcs:ignore Standard.Cat.SniffName -- for reasons.
59
-    $x === 'test'
59
+	$x === 'test'
60 60
 ) {}
61 61
 
62 62
 // phpcs:set Generic.Formatting.SpaceAfterCast ignoreNewlines true
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	$var1 + (bool)  $var2;
65 65
 
66 66
 if ( (string) // phpcs:ignore Standard.Cat.SniffName -- for reasons.
67
-    $x === 'test'
67
+	$x === 'test'
68 68
 ) {}
69 69
 // phpcs:set Generic.Formatting.SpaceAfterCast ignoreNewlines false
70 70
 
Please login to merge, or discard this patch.
Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.inc 1 patch
Indentation   +159 added lines, -159 removed lines patch added patch discarded remove patch
@@ -83,122 +83,122 @@  discard block
 block discarded – undo
83 83
 
84 84
 class MyClass
85 85
 {
86
-    const MODE_DEBUG = 'debug';
87
-    const MODE_DEBUG2 = 'debug';
86
+	const MODE_DEBUG = 'debug';
87
+	const MODE_DEBUG2 = 'debug';
88 88
 
89
-    var $array[$test] = 'anything';
90
-    var $var          = 'anything';
89
+	var $array[$test] = 'anything';
90
+	var $var          = 'anything';
91 91
 
92
-    const MODE_DEBUG3  = 'debug';
93
-    public $array[$test]    = 'anything';
94
-    private $vara             = 'anything';
95
-    protected $array[($test + 1)] = 'anything';
96
-    var $array[($blah + (10 - $test))] = 'anything';
92
+	const MODE_DEBUG3  = 'debug';
93
+	public $array[$test]    = 'anything';
94
+	private $vara             = 'anything';
95
+	protected $array[($test + 1)] = 'anything';
96
+	var $array[($blah + (10 - $test))] = 'anything';
97 97
 }
98 98
 
99 99
 function myFunction($var=true)
100 100
 {
101
-    if ($strict === true) {
102
-        $length          = strlen($string);
103
-        $lastCharWasCaps = ($classFormat === false) ? false : true;
104
-
105
-        for ($i = 1; $i < $length; $i++) {
106
-            $isCaps = (strtoupper($string{$i}) === $string{$i}) ? true : false;
107
-            if ($isCaps === true && $lastCharWasCaps === true) {
108
-                return false;
109
-            }
110
-
111
-            $lastCharWasCaps = $isCaps;
112
-        }
113
-    }
101
+	if ($strict === true) {
102
+		$length          = strlen($string);
103
+		$lastCharWasCaps = ($classFormat === false) ? false : true;
104
+
105
+		for ($i = 1; $i < $length; $i++) {
106
+			$isCaps = (strtoupper($string{$i}) === $string{$i}) ? true : false;
107
+			if ($isCaps === true && $lastCharWasCaps === true) {
108
+				return false;
109
+			}
110
+
111
+			$lastCharWasCaps = $isCaps;
112
+		}
113
+	}
114 114
 }
115 115
 
116 116
 // Valid
117 117
 for ($i = 0; $i < 10; $i += 2) {
118
-    $i = ($i - 1);
118
+	$i = ($i - 1);
119 119
 }
120 120
 
121 121
 // Invalid
122 122
 foreach ($files as $file) {
123
-    $saves[$file] = array();
124
-    $contents = stripslashes(file_get_contents($file));
125
-    list($assetid, $time, $content) = explode("\n", $contents);
126
-    $saves[$file]['assetid'] = $assetid;
123
+	$saves[$file] = array();
124
+	$contents = stripslashes(file_get_contents($file));
125
+	list($assetid, $time, $content) = explode("\n", $contents);
126
+	$saves[$file]['assetid'] = $assetid;
127 127
 }
128 128
 
129 129
 $i = ($i - 10);
130 130
 $ip = ($i - 10);
131 131
 for ($i = 0; $i < 10; $i += 2) {
132
-    $i = ($i - 10);
132
+	$i = ($i - 10);
133 133
 }
134 134
 
135 135
 // Valid
136 136
 $variable = 12;
137 137
 $var      = a_very(long_line('that', 'contains'),
138
-                   a_bunch('of long', 'parameters'),
139
-                   'that_need to be aligned with the equal sign');
138
+				   a_bunch('of long', 'parameters'),
139
+				   'that_need to be aligned with the equal sign');
140 140
 $var2     = 12;
141 141
 
142 142
 // Valid
143 143
 $variable = 12;
144 144
 $var      = 'a very long line of text that contains '
145
-            .$someVar
146
-            .' and some other stuff that is too long to fit on one line';
145
+			.$someVar
146
+			.' and some other stuff that is too long to fit on one line';
147 147
 $var2     = 12;
148 148
 
149 149
 // Invalid
150 150
 $variable = 12;
151 151
 $var      = a_very(long_line('that', 'contains'),
152
-                   a_bunch('of long', 'parameters'),
153
-                   'that_need to be aligned with the equal sign');
152
+				   a_bunch('of long', 'parameters'),
153
+				   'that_need to be aligned with the equal sign');
154 154
 $var2 = 12;
155 155
 
156 156
 // Invalid
157 157
 $variable = 12;
158 158
 $var      = 'a very long line of text that contains '
159
-            .$someVar
160
-            .' and some other stuff that is too long to fit on one line';
159
+			.$someVar
160
+			.' and some other stuff that is too long to fit on one line';
161 161
 $var2 = 12;
162 162
 
163 163
 // Valid
164 164
 $variable = 12;
165 165
 $var     .= 'a very long line of text that contains '
166
-            .$someVar
167
-            .' and some other stuff that is too long to fit on one line';
166
+			.$someVar
167
+			.' and some other stuff that is too long to fit on one line';
168 168
 $var2     = 12;
169 169
 
170 170
 // Valid
171 171
 $variable += 12;
172 172
 $var      .= 'a very long line of text that contains '
173
-            .$someVar
174
-            .' and some other stuff that is too long to fit on one line';
173
+			.$someVar
174
+			.' and some other stuff that is too long to fit on one line';
175 175
 $var2      = 12;
176 176
 
177 177
 // Invalid
178 178
 $variable  = 12;
179 179
 $var      .= 'a very long line of text that contains '
180
-            .$someVar
181
-            .' and some other stuff that is too long to fit on one line';
180
+			.$someVar
181
+			.' and some other stuff that is too long to fit on one line';
182 182
 $var2      = 12;
183 183
 
184 184
 // Valid
185 185
 $error = false;
186 186
 while (list($h, $f) = getKeyAndValue($handle)) {
187
-    $error = true;
187
+	$error = true;
188 188
 }
189 189
 
190 190
 // Valid
191 191
 $value = false;
192 192
 function blah ($value = true) {
193
-    $value = false;
194
-    if ($value === true) {
195
-        $value = false;
196
-    }
193
+	$value = false;
194
+	if ($value === true) {
195
+		$value = false;
196
+	}
197 197
 }
198 198
 
199 199
 if (TRUE) {
200
-    $args = array('foo' => 'foo');
201
-    $res  = 'bar';
200
+	$args = array('foo' => 'foo');
201
+	$res  = 'bar';
202 202
 }
203 203
 
204 204
 // phpcs:set Generic.Formatting.MultipleStatementAlignment maxPadding 8
@@ -234,140 +234,140 @@  discard block
 block discarded – undo
234 234
 $foo = $moooo = 'foo';
235 235
 
236 236
 $foobarbaz = array_map(
237
-    function ($n) {
238
-        return $n * $n;
239
-    },
240
-    [1, 2, 3]
237
+	function ($n) {
238
+		return $n * $n;
239
+	},
240
+	[1, 2, 3]
241 241
 );
242 242
 $foo       = 5;
243 243
 
244 244
 $loggerResult = $util->setLogger(new class {
245
-    public function log($msg)
246
-    {
247
-        echo $msg;
248
-    }
245
+	public function log($msg)
246
+	{
247
+		echo $msg;
248
+	}
249 249
 });
250 250
 $foo          = 5;
251 251
 
252 252
 $foo = array(
253
-    'a' => 'b',
253
+	'a' => 'b',
254 254
 );
255 255
 $barbar = 'bar';
256 256
 
257 257
 $foo = array(
258
-    // Some comment.
259
-    'a' => 'b',
258
+	// Some comment.
259
+	'a' => 'b',
260 260
 );
261 261
 $barbar = 'bar';
262 262
 
263 263
 $foo = [
264
-    // phpcs:ignore Standard.Category.Sniff.Code -- for reasons.
265
-    'a' => 'b',
264
+	// phpcs:ignore Standard.Category.Sniff.Code -- for reasons.
265
+	'a' => 'b',
266 266
 ];
267 267
 $barbar = 'bar';
268 268
 
269 269
 $foo = [
270 270
 
271
-    'a' => 'b',
271
+	'a' => 'b',
272 272
 ];
273 273
 $barbar = 'bar';
274 274
 
275 275
 function buildForm(FormBuilderInterface $builder, array $options)
276 276
 {
277
-    $transformer = new ContractTransformer($options['contracts']);
278
-    $types       = ['support.contact.question' => ContactData::QUESTION];
277
+	$transformer = new ContractTransformer($options['contracts']);
278
+	$types       = ['support.contact.question' => ContactData::QUESTION];
279 279
 
280
-    [$important, $questions, $incidents, $requests] = $this->createContractBuckets($options['contracts']);
280
+	[$important, $questions, $incidents, $requests] = $this->createContractBuckets($options['contracts']);
281 281
 }
282 282
 
283 283
 function buildForm(FormBuilderInterface $builder, array $options)
284 284
 {
285
-    $transformer                                    = new ContractTransformer($options['contracts']);
286
-    $types                                          = ['support.contact.question' => ContactData::QUESTION];
287
-    [$important, $questions, $incidents, $requests] = $this->createContractBuckets($options['contracts']);
285
+	$transformer                                    = new ContractTransformer($options['contracts']);
286
+	$types                                          = ['support.contact.question' => ContactData::QUESTION];
287
+	[$important, $questions, $incidents, $requests] = $this->createContractBuckets($options['contracts']);
288 288
 }
289 289
 
290 290
 $loggerResult = $util->setLogger(new class {
291
-    public function log($msg)
292
-    {
293
-        $a = $msg;
294
-        $foobar = $msg;
295
-        $foo = function() {
296
-            $a = $msg;
297
-            $foobar = $msg;
298
-            $loggerResult = $util->setLogger(new class {
299
-                public function log($msg)
300
-                {
301
-                    $a = $msg;
302
-                    $foobar = $msg;
303
-                    $foo = function() {
304
-                        foo(function() {
305
-                            foo(function() {
306
-                                echo 'hi';
307
-                            });
308
-                            $a = $msg;
309
-                            $foobar = $msg;
310
-
311
-                            $foo = function() {
312
-
313
-                                $foo = 1;
314
-                                $barbar=2;
315
-                            };
316
-                            $barbar = function() {
317
-                                $foo    = 1;
318
-                                $barbar = 2;
319
-                            };
320
-                        });
321
-                        $a = $msg;
322
-                        $foobar      = $msg;
323
-                    };
324
-                    $bar = $msg;
325
-                }
326
-
327
-                public function log2($msg)
328
-                {
329
-                    $a = $msg;
330
-                    $foobar = $msg;
331
-                    $foo = function() {
332
-                        foo(function() {
333
-                            foo(function() {
334
-                                echo 'hi';
335
-                            });
336
-                            $a = $msg;
337
-                            $foobar = $msg;
338
-
339
-                            $foo = function() {
340
-
341
-                                $foo = 1;
342
-                                $barbar=2;
343
-                            };
344
-                            $barbar = function() {
345
-                                $foo    = 1;
346
-                                $barbar = 2;
347
-                            };
348
-                        });
349
-                        $a = $msg;
350
-                        $foobar      = $msg;
351
-                    };
352
-                    $bar = $msg;
353
-                }
354
-            });
355
-            $foo          = 5;
356
-        };
357
-        $bar = $msg;
358
-    }
291
+	public function log($msg)
292
+	{
293
+		$a = $msg;
294
+		$foobar = $msg;
295
+		$foo = function() {
296
+			$a = $msg;
297
+			$foobar = $msg;
298
+			$loggerResult = $util->setLogger(new class {
299
+				public function log($msg)
300
+				{
301
+					$a = $msg;
302
+					$foobar = $msg;
303
+					$foo = function() {
304
+						foo(function() {
305
+							foo(function() {
306
+								echo 'hi';
307
+							});
308
+							$a = $msg;
309
+							$foobar = $msg;
310
+
311
+							$foo = function() {
312
+
313
+								$foo = 1;
314
+								$barbar=2;
315
+							};
316
+							$barbar = function() {
317
+								$foo    = 1;
318
+								$barbar = 2;
319
+							};
320
+						});
321
+						$a = $msg;
322
+						$foobar      = $msg;
323
+					};
324
+					$bar = $msg;
325
+				}
326
+
327
+				public function log2($msg)
328
+				{
329
+					$a = $msg;
330
+					$foobar = $msg;
331
+					$foo = function() {
332
+						foo(function() {
333
+							foo(function() {
334
+								echo 'hi';
335
+							});
336
+							$a = $msg;
337
+							$foobar = $msg;
338
+
339
+							$foo = function() {
340
+
341
+								$foo = 1;
342
+								$barbar=2;
343
+							};
344
+							$barbar = function() {
345
+								$foo    = 1;
346
+								$barbar = 2;
347
+							};
348
+						});
349
+						$a = $msg;
350
+						$foobar      = $msg;
351
+					};
352
+					$bar = $msg;
353
+				}
354
+			});
355
+			$foo          = 5;
356
+		};
357
+		$bar = $msg;
358
+	}
359 359
 });
360 360
 $foo          = 5;
361 361
 
362 362
 $foo = [
363
-    0 => function () {
364
-        $foo = 'foo';
365
-        $barbar = 'bar';
366
-    },
367
-    1 => function () {
368
-        $foo    = 'foo';
369
-        $barbar = 'bar';
370
-    },
363
+	0 => function () {
364
+		$foo = 'foo';
365
+		$barbar = 'bar';
366
+	},
367
+	1 => function () {
368
+		$foo    = 'foo';
369
+		$barbar = 'bar';
370
+	},
371 371
 ];
372 372
 
373 373
 $abc = 'something';
@@ -375,31 +375,31 @@  discard block
 block discarded – undo
375 375
 $defghi = 'longer something';
376 376
 
377 377
 function foo() {
378
-    $foo = 'foo';
379
-    $bar = 'bar';
380
-    ?>
378
+	$foo = 'foo';
379
+	$bar = 'bar';
380
+	?>
381 381
 
382 382
     <div>
383 383
         <?php
384
-        $foo = 'foo';
385
-        $bar = 'bar';
386
-        ?>
384
+		$foo = 'foo';
385
+		$bar = 'bar';
386
+		?>
387 387
     </div>
388 388
     <?php
389 389
 }
390 390
 
391 391
 $foo = new Foo([
392
-    $a = new Bar(),
393
-    $b = new Bar(),
392
+	$a = new Bar(),
393
+	$b = new Bar(),
394 394
 ]);
395 395
 
396 396
 $foo = new Foo([
397
-    $a = new Bar(),
398
-    $b    = new Bar(),
399
-    $c  = new Bar(),
397
+	$a = new Bar(),
398
+	$b    = new Bar(),
399
+	$c  = new Bar(),
400 400
 ]);
401 401
 $foofoo   = new Foo([
402
-    $a = new Bar(),
403
-    $b = new Bar(),
404
-    $c = new Bar(),
402
+	$a = new Bar(),
403
+	$b = new Bar(),
404
+	$c = new Bar(),
405 405
 ]);
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Formatting/NoSpaceAfterCastUnitTest.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -15,58 +15,58 @@
 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
-            3  => 1,
30
-            5  => 1,
31
-            7  => 1,
32
-            9  => 1,
33
-            11 => 1,
34
-            13 => 1,
35
-            15 => 1,
36
-            17 => 1,
37
-            19 => 1,
38
-            21 => 1,
39
-            23 => 1,
40
-            25 => 1,
41
-            27 => 1,
42
-            29 => 1,
43
-            31 => 1,
44
-            33 => 1,
45
-            35 => 1,
46
-            37 => 1,
47
-            39 => 1,
48
-            41 => 1,
49
-            43 => 1,
50
-            45 => 1,
51
-            50 => 1,
52
-        ];
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
+			3  => 1,
30
+			5  => 1,
31
+			7  => 1,
32
+			9  => 1,
33
+			11 => 1,
34
+			13 => 1,
35
+			15 => 1,
36
+			17 => 1,
37
+			19 => 1,
38
+			21 => 1,
39
+			23 => 1,
40
+			25 => 1,
41
+			27 => 1,
42
+			29 => 1,
43
+			31 => 1,
44
+			33 => 1,
45
+			35 => 1,
46
+			37 => 1,
47
+			39 => 1,
48
+			41 => 1,
49
+			43 => 1,
50
+			45 => 1,
51
+			50 => 1,
52
+		];
53 53
 
54
-    }//end getErrorList()
54
+	}//end getErrorList()
55 55
 
56 56
 
57
-    /**
58
-     * Returns the lines where warnings should occur.
59
-     *
60
-     * The key of the array should represent the line number and the value
61
-     * should represent the number of warnings that should occur on that line.
62
-     *
63
-     * @return array<int, int>
64
-     */
65
-    public function getWarningList()
66
-    {
67
-        return [];
57
+	/**
58
+	 * Returns the lines where warnings should occur.
59
+	 *
60
+	 * The key of the array should represent the line number and the value
61
+	 * should represent the number of warnings that should occur on that line.
62
+	 *
63
+	 * @return array<int, int>
64
+	 */
65
+	public function getWarningList()
66
+	{
67
+		return [];
68 68
 
69
-    }//end getWarningList()
69
+	}//end getWarningList()
70 70
 
71 71
 
72 72
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.inc 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 $var = array(
59 59
 	(bool) $a,
60 60
 	array(
61
-        (int) $b,
61
+		(int) $b,
62 62
 	),
63 63
 );
64 64
 
Please login to merge, or discard this patch.
Standards/Generic/Tests/Formatting/DisallowMultipleStatementsUnitTest.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -15,40 +15,40 @@
 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
-            2  => 1,
30
-            6  => 1,
31
-            7  => 1,
32
-            8  => 2,
33
-            16 => 2,
34
-        ];
35
-
36
-    }//end getErrorList()
37
-
38
-
39
-    /**
40
-     * Returns the lines where warnings should occur.
41
-     *
42
-     * The key of the array should represent the line number and the value
43
-     * should represent the number of warnings that should occur on that line.
44
-     *
45
-     * @return array<int, int>
46
-     */
47
-    public function getWarningList()
48
-    {
49
-        return [];
50
-
51
-    }//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
+			2  => 1,
30
+			6  => 1,
31
+			7  => 1,
32
+			8  => 2,
33
+			16 => 2,
34
+		];
35
+
36
+	}//end getErrorList()
37
+
38
+
39
+	/**
40
+	 * Returns the lines where warnings should occur.
41
+	 *
42
+	 * The key of the array should represent the line number and the value
43
+	 * should represent the number of warnings that should occur on that line.
44
+	 *
45
+	 * @return array<int, int>
46
+	 */
47
+	public function getWarningList()
48
+	{
49
+		return [];
50
+
51
+	}//end getWarningList()
52 52
 
53 53
 
54 54
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.php 1 patch
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -15,77 +15,77 @@
 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='')
29
-    {
30
-        switch ($testFile) {
31
-        case 'SpaceAfterNotUnitTest.inc':
32
-            return [
33
-                3  => 2,
34
-                4  => 2,
35
-                5  => 2,
36
-                6  => 1,
37
-                7  => 1,
38
-                8  => 1,
39
-                11 => 1,
40
-                14 => 1,
41
-                17 => 1,
42
-                20 => 1,
43
-                28 => 1,
44
-                38 => 2,
45
-                39 => 2,
46
-                40 => 1,
47
-                41 => 1,
48
-                42 => 1,
49
-                48 => 1,
50
-                51 => 1,
51
-                56 => 2,
52
-                57 => 1,
53
-                58 => 1,
54
-                59 => 1,
55
-                62 => 1,
56
-                65 => 1,
57
-                68 => 1,
58
-                71 => 1,
59
-                79 => 1,
60
-            ];
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='')
29
+	{
30
+		switch ($testFile) {
31
+		case 'SpaceAfterNotUnitTest.inc':
32
+			return [
33
+				3  => 2,
34
+				4  => 2,
35
+				5  => 2,
36
+				6  => 1,
37
+				7  => 1,
38
+				8  => 1,
39
+				11 => 1,
40
+				14 => 1,
41
+				17 => 1,
42
+				20 => 1,
43
+				28 => 1,
44
+				38 => 2,
45
+				39 => 2,
46
+				40 => 1,
47
+				41 => 1,
48
+				42 => 1,
49
+				48 => 1,
50
+				51 => 1,
51
+				56 => 2,
52
+				57 => 1,
53
+				58 => 1,
54
+				59 => 1,
55
+				62 => 1,
56
+				65 => 1,
57
+				68 => 1,
58
+				71 => 1,
59
+				79 => 1,
60
+			];
61 61
 
62
-        case 'SpaceAfterNotUnitTest.js':
63
-            return [
64
-                2 => 2,
65
-                4 => 2,
66
-                5 => 1,
67
-            ];
62
+		case 'SpaceAfterNotUnitTest.js':
63
+			return [
64
+				2 => 2,
65
+				4 => 2,
66
+				5 => 1,
67
+			];
68 68
 
69
-        default:
70
-            return [];
71
-        }//end switch
69
+		default:
70
+			return [];
71
+		}//end switch
72 72
 
73
-    }//end getErrorList()
73
+	}//end getErrorList()
74 74
 
75 75
 
76
-    /**
77
-     * Returns the lines where warnings should occur.
78
-     *
79
-     * The key of the array should represent the line number and the value
80
-     * should represent the number of warnings that should occur on that line.
81
-     *
82
-     * @return array<int, int>
83
-     */
84
-    public function getWarningList()
85
-    {
86
-        return [];
76
+	/**
77
+	 * Returns the lines where warnings should occur.
78
+	 *
79
+	 * The key of the array should represent the line number and the value
80
+	 * should represent the number of warnings that should occur on that line.
81
+	 *
82
+	 * @return array<int, int>
83
+	 */
84
+	public function getWarningList()
85
+	{
86
+		return [];
87 87
 
88
-    }//end getWarningList()
88
+	}//end getWarningList()
89 89
 
90 90
 
91 91
 }//end class
Please login to merge, or discard this patch.
Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.php 1 patch
Indentation   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -15,142 +15,142 @@
 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 [];
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 29
 
30
-    }//end getErrorList()
30
+	}//end getErrorList()
31 31
 
32 32
 
33
-    /**
34
-     * Returns the lines where warnings should occur.
35
-     *
36
-     * The key of the array should represent the line number and the value
37
-     * should represent the number of warnings that should occur on that line.
38
-     *
39
-     * @param string $testFile The name of the file being tested.
40
-     *
41
-     * @return array<int, int>
42
-     */
43
-    public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc')
44
-    {
45
-        switch ($testFile) {
46
-        case 'MultipleStatementAlignmentUnitTest.inc':
47
-            return [
48
-                11  => 1,
49
-                12  => 1,
50
-                23  => 1,
51
-                24  => 1,
52
-                26  => 1,
53
-                27  => 1,
54
-                37  => 1,
55
-                38  => 1,
56
-                48  => 1,
57
-                50  => 1,
58
-                51  => 1,
59
-                61  => 1,
60
-                62  => 1,
61
-                64  => 1,
62
-                65  => 1,
63
-                71  => 1,
64
-                78  => 1,
65
-                79  => 1,
66
-                86  => 1,
67
-                92  => 1,
68
-                93  => 1,
69
-                94  => 1,
70
-                95  => 1,
71
-                123 => 1,
72
-                124 => 1,
73
-                126 => 1,
74
-                129 => 1,
75
-                154 => 1,
76
-                161 => 1,
77
-                178 => 1,
78
-                179 => 1,
79
-                182 => 1,
80
-                206 => 1,
81
-                207 => 1,
82
-                252 => 1,
83
-                257 => 1,
84
-                263 => 1,
85
-                269 => 1,
86
-                293 => 1,
87
-                295 => 1,
88
-                296 => 1,
89
-                297 => 1,
90
-                301 => 1,
91
-                303 => 1,
92
-                308 => 1,
93
-                311 => 1,
94
-                313 => 1,
95
-                314 => 1,
96
-                321 => 1,
97
-                322 => 1,
98
-                324 => 1,
99
-                329 => 1,
100
-                331 => 1,
101
-                336 => 1,
102
-                339 => 1,
103
-                341 => 1,
104
-                342 => 1,
105
-                349 => 1,
106
-                350 => 1,
107
-                352 => 1,
108
-                357 => 1,
109
-                364 => 1,
110
-                396 => 1,
111
-                398 => 1,
112
-                399 => 1,
113
-                401 => 1,
114
-            ];
115
-        break;
116
-        case 'MultipleStatementAlignmentUnitTest.js':
117
-            return [
118
-                11  => 1,
119
-                12  => 1,
120
-                23  => 1,
121
-                24  => 1,
122
-                26  => 1,
123
-                27  => 1,
124
-                37  => 1,
125
-                38  => 1,
126
-                48  => 1,
127
-                50  => 1,
128
-                51  => 1,
129
-                61  => 1,
130
-                62  => 1,
131
-                64  => 1,
132
-                65  => 1,
133
-                71  => 1,
134
-                78  => 1,
135
-                79  => 1,
136
-                81  => 1,
137
-                82  => 1,
138
-                83  => 1,
139
-                85  => 1,
140
-                86  => 1,
141
-                100 => 1,
142
-                112 => 1,
143
-                113 => 1,
144
-                114 => 1,
145
-                117 => 1,
146
-            ];
147
-            break;
148
-        default:
149
-            return [];
150
-            break;
151
-        }//end switch
33
+	/**
34
+	 * Returns the lines where warnings should occur.
35
+	 *
36
+	 * The key of the array should represent the line number and the value
37
+	 * should represent the number of warnings that should occur on that line.
38
+	 *
39
+	 * @param string $testFile The name of the file being tested.
40
+	 *
41
+	 * @return array<int, int>
42
+	 */
43
+	public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc')
44
+	{
45
+		switch ($testFile) {
46
+		case 'MultipleStatementAlignmentUnitTest.inc':
47
+			return [
48
+				11  => 1,
49
+				12  => 1,
50
+				23  => 1,
51
+				24  => 1,
52
+				26  => 1,
53
+				27  => 1,
54
+				37  => 1,
55
+				38  => 1,
56
+				48  => 1,
57
+				50  => 1,
58
+				51  => 1,
59
+				61  => 1,
60
+				62  => 1,
61
+				64  => 1,
62
+				65  => 1,
63
+				71  => 1,
64
+				78  => 1,
65
+				79  => 1,
66
+				86  => 1,
67
+				92  => 1,
68
+				93  => 1,
69
+				94  => 1,
70
+				95  => 1,
71
+				123 => 1,
72
+				124 => 1,
73
+				126 => 1,
74
+				129 => 1,
75
+				154 => 1,
76
+				161 => 1,
77
+				178 => 1,
78
+				179 => 1,
79
+				182 => 1,
80
+				206 => 1,
81
+				207 => 1,
82
+				252 => 1,
83
+				257 => 1,
84
+				263 => 1,
85
+				269 => 1,
86
+				293 => 1,
87
+				295 => 1,
88
+				296 => 1,
89
+				297 => 1,
90
+				301 => 1,
91
+				303 => 1,
92
+				308 => 1,
93
+				311 => 1,
94
+				313 => 1,
95
+				314 => 1,
96
+				321 => 1,
97
+				322 => 1,
98
+				324 => 1,
99
+				329 => 1,
100
+				331 => 1,
101
+				336 => 1,
102
+				339 => 1,
103
+				341 => 1,
104
+				342 => 1,
105
+				349 => 1,
106
+				350 => 1,
107
+				352 => 1,
108
+				357 => 1,
109
+				364 => 1,
110
+				396 => 1,
111
+				398 => 1,
112
+				399 => 1,
113
+				401 => 1,
114
+			];
115
+		break;
116
+		case 'MultipleStatementAlignmentUnitTest.js':
117
+			return [
118
+				11  => 1,
119
+				12  => 1,
120
+				23  => 1,
121
+				24  => 1,
122
+				26  => 1,
123
+				27  => 1,
124
+				37  => 1,
125
+				38  => 1,
126
+				48  => 1,
127
+				50  => 1,
128
+				51  => 1,
129
+				61  => 1,
130
+				62  => 1,
131
+				64  => 1,
132
+				65  => 1,
133
+				71  => 1,
134
+				78  => 1,
135
+				79  => 1,
136
+				81  => 1,
137
+				82  => 1,
138
+				83  => 1,
139
+				85  => 1,
140
+				86  => 1,
141
+				100 => 1,
142
+				112 => 1,
143
+				113 => 1,
144
+				114 => 1,
145
+				117 => 1,
146
+			];
147
+			break;
148
+		default:
149
+			return [];
150
+			break;
151
+		}//end switch
152 152
 
153
-    }//end getWarningList()
153
+	}//end getWarningList()
154 154
 
155 155
 
156 156
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.php 1 patch
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -15,73 +15,73 @@
 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
-            5  => 1,
31
-            8  => 1,
32
-            9  => 1,
33
-            12 => 1,
34
-            13 => 1,
35
-            16 => 1,
36
-            17 => 1,
37
-            20 => 1,
38
-            21 => 1,
39
-            24 => 1,
40
-            25 => 1,
41
-            28 => 1,
42
-            29 => 1,
43
-            32 => 1,
44
-            33 => 1,
45
-            36 => 1,
46
-            37 => 1,
47
-            40 => 1,
48
-            41 => 1,
49
-            44 => 1,
50
-            45 => 1,
51
-            51 => 1,
52
-            53 => 1,
53
-            55 => 1,
54
-            58 => 1,
55
-            64 => 1,
56
-            72 => 1,
57
-            73 => 1,
58
-            75 => 1,
59
-            76 => 1,
60
-            78 => 1,
61
-            82 => 1,
62
-            84 => 1,
63
-            85 => 1,
64
-            86 => 1,
65
-            88 => 1,
66
-            93 => 1,
67
-        ];
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
+			5  => 1,
31
+			8  => 1,
32
+			9  => 1,
33
+			12 => 1,
34
+			13 => 1,
35
+			16 => 1,
36
+			17 => 1,
37
+			20 => 1,
38
+			21 => 1,
39
+			24 => 1,
40
+			25 => 1,
41
+			28 => 1,
42
+			29 => 1,
43
+			32 => 1,
44
+			33 => 1,
45
+			36 => 1,
46
+			37 => 1,
47
+			40 => 1,
48
+			41 => 1,
49
+			44 => 1,
50
+			45 => 1,
51
+			51 => 1,
52
+			53 => 1,
53
+			55 => 1,
54
+			58 => 1,
55
+			64 => 1,
56
+			72 => 1,
57
+			73 => 1,
58
+			75 => 1,
59
+			76 => 1,
60
+			78 => 1,
61
+			82 => 1,
62
+			84 => 1,
63
+			85 => 1,
64
+			86 => 1,
65
+			88 => 1,
66
+			93 => 1,
67
+		];
68 68
 
69
-    }//end getErrorList()
69
+	}//end getErrorList()
70 70
 
71 71
 
72
-    /**
73
-     * Returns the lines where warnings should occur.
74
-     *
75
-     * The key of the array should represent the line number and the value
76
-     * should represent the number of warnings that should occur on that line.
77
-     *
78
-     * @return array<int, int>
79
-     */
80
-    public function getWarningList()
81
-    {
82
-        return [];
72
+	/**
73
+	 * Returns the lines where warnings should occur.
74
+	 *
75
+	 * The key of the array should represent the line number and the value
76
+	 * should represent the number of warnings that should occur on that line.
77
+	 *
78
+	 * @return array<int, int>
79
+	 */
80
+	public function getWarningList()
81
+	{
82
+		return [];
83 83
 
84
-    }//end getWarningList()
84
+	}//end getWarningList()
85 85
 
86 86
 
87 87
 }//end class
Please login to merge, or discard this patch.