Skip to content

Commit e8acf8e

Browse files
committed
Merge branch 'master' into 3.0
2 parents 456038f + 158ee42 commit e8acf8e

6 files changed

+33
-7
lines changed

src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ public function process(File $phpcsFile, $stackPtr)
220220
&& $tokens[$checkToken]['code'] === T_CLOSE_PARENTHESIS
221221
&& isset($tokens[$checkToken]['parenthesis_opener']) === true)
222222
|| ($tokens[$i]['code'] === T_CLOSE_PARENTHESIS
223-
&& isset($tokens[$i]['parenthesis_opener']) === true
224-
&& isset($tokens[$i]['parenthesis_owner']) === true
225-
&& $tokens[$tokens[$i]['parenthesis_owner']]['code'] === T_ARRAY)
223+
&& isset($tokens[$i]['parenthesis_opener']) === true)
226224
) {
227225
if ($checkToken !== null) {
228226
$parenCloser = $checkToken;

src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc

+7
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,13 @@ $foo = [
11351135
},
11361136
];
11371137

1138+
$foo
1139+
->bar(foo(function () {
1140+
}), foo(function () {
1141+
}));
1142+
1143+
echo 'foo';
1144+
11381145
class Test {
11391146

11401147
public function a() {

src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc.fixed

+7
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,13 @@ $foo = [
11351135
},
11361136
];
11371137

1138+
$foo
1139+
->bar(foo(function () {
1140+
}), foo(function () {
1141+
}));
1142+
1143+
echo 'foo';
1144+
11381145
class Test {
11391146

11401147
public function a() {

src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc

+7
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,13 @@ $foo = [
11351135
},
11361136
];
11371137

1138+
$foo
1139+
->bar(foo(function () {
1140+
}), foo(function () {
1141+
}));
1142+
1143+
echo 'foo';
1144+
11381145
class Test {
11391146

11401147
public function a() {

src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc.fixed

+7
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,13 @@ $foo = [
11351135
},
11361136
];
11371137

1138+
$foo
1139+
->bar(foo(function () {
1140+
}), foo(function () {
1141+
}));
1142+
1143+
echo 'foo';
1144+
11381145
class Test {
11391146

11401147
public function a() {

src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ public function getErrorList($testFile='ScopeIndentUnitTest.inc')
138138
823 => 1,
139139
858 => 1,
140140
879 => 1,
141-
1156 => 1,
142-
1164 => 1,
143-
1169 => 1,
141+
1163 => 1,
144142
1171 => 1,
145-
1174 => 1,
143+
1176 => 1,
144+
1178 => 1,
145+
1181 => 1,
146146
);
147147

148148
}//end getErrorList()

0 commit comments

Comments
 (0)