Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1162323

Browse files
committed
Add fix
1 parent d010859 commit 1162323

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ jobs:
231231
env:
232232
PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.PHP_CS_FIXER_IGNORE_ENV }}
233233
FAST_LINT_TEST_CASES: ${{ matrix.FAST_LINT_TEST_CASES }}
234-
run: vendor/bin/phpunit tests/Fixer/FunctionNotation/NoUnreachableDefaultArgumentValueFixerTest.php
234+
run: vendor/bin/paraunit run --testsuite unit,integration
235235

236236
- name: Run tests with "short_open_tag" enabled
237237
if: matrix.run-tests == 'yes' && matrix.collect-code-coverage != 'yes'

src/Fixer/FunctionNotation/NoUnreachableDefaultArgumentValueFixer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ private function getLastNonDefaultArgumentIndex(Tokens $tokens, int $startIndex,
116116
continue;
117117
}
118118

119+
if ($token->isGivenKind(CT::T_PROPERTY_HOOK_BRACE_CLOSE)) {
120+
$i = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PROPERTY_HOOK, $i);
121+
122+
continue;
123+
}
124+
119125
if ($token->isGivenKind(T_VARIABLE) && !$this->isEllipsis($tokens, $i)) {
120126
return $i;
121127
}

0 commit comments

Comments
 (0)