diff --git a/src/Fixer/Spacing/MethodChainingNewlineFixer.php b/src/Fixer/Spacing/MethodChainingNewlineFixer.php index 09e22a3b..6455a204 100644 --- a/src/Fixer/Spacing/MethodChainingNewlineFixer.php +++ b/src/Fixer/Spacing/MethodChainingNewlineFixer.php @@ -119,7 +119,7 @@ private function isDoubleBracket(Tokens $tokens, int $position): bool * * @param Tokens $tokens */ - private function isPreceededByOpenedCallInAnotherBracket(Tokens $tokens, int $position): bool + private function isPrecededByOpenedCallInAnotherBracket(Tokens $tokens, int $position): bool { $blockInfo = $this->blockFinder->findInTokensByEdge($tokens, $position); if (! $blockInfo instanceof BlockInfo) { @@ -142,11 +142,11 @@ private function shouldBracketPrefix(Tokens $tokens, int $position, int $objectO return false; } - if ($this->chainMethodCallAnalyzer->isPreceededByFuncCall($tokens, $position)) { + if ($this->chainMethodCallAnalyzer->isPrecededByFuncCall($tokens, $position)) { return false; } - if ($this->isPreceededByOpenedCallInAnotherBracket($tokens, $position)) { + if ($this->isPrecededByOpenedCallInAnotherBracket($tokens, $position)) { return false; } diff --git a/src/TokenAnalyzer/ChainMethodCallAnalyzer.php b/src/TokenAnalyzer/ChainMethodCallAnalyzer.php index 9538e5a3..74e893f5 100644 --- a/src/TokenAnalyzer/ChainMethodCallAnalyzer.php +++ b/src/TokenAnalyzer/ChainMethodCallAnalyzer.php @@ -22,7 +22,7 @@ public function __construct( * * @param Tokens $tokens */ - public function isPreceededByFuncCall(Tokens $tokens, int $position): bool + public function isPrecededByFuncCall(Tokens $tokens, int $position): bool { for ($i = $position; $i >= 0; --$i) { /** @var Token $currentToken */