Skip to content

Commit 180e5ad

Browse files
committed
Fix spelling
1 parent 48ebe24 commit 180e5ad

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/Fixer/Spacing/MethodChainingNewlineFixer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private function isDoubleBracket(Tokens $tokens, int $position): bool
119119
*
120120
* @param Tokens<Token> $tokens
121121
*/
122-
private function isPreceededByOpenedCallInAnotherBracket(Tokens $tokens, int $position): bool
122+
private function isPrecededByOpenedCallInAnotherBracket(Tokens $tokens, int $position): bool
123123
{
124124
$blockInfo = $this->blockFinder->findInTokensByEdge($tokens, $position);
125125
if (! $blockInfo instanceof BlockInfo) {
@@ -142,11 +142,11 @@ private function shouldBracketPrefix(Tokens $tokens, int $position, int $objectO
142142
return false;
143143
}
144144

145-
if ($this->chainMethodCallAnalyzer->isPreceededByFuncCall($tokens, $position)) {
145+
if ($this->chainMethodCallAnalyzer->isPrecededByFuncCall($tokens, $position)) {
146146
return false;
147147
}
148148

149-
if ($this->isPreceededByOpenedCallInAnotherBracket($tokens, $position)) {
149+
if ($this->isPrecededByOpenedCallInAnotherBracket($tokens, $position)) {
150150
return false;
151151
}
152152

src/TokenAnalyzer/ChainMethodCallAnalyzer.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,20 @@ public function __construct(
2121
* Matches e.g: return app()->some(), app()->some(), (clone app)->some()
2222
*
2323
* @param Tokens<Token> $tokens
24+
*
25+
* @deprecated use isPrecededByFuncCall() instead.
2426
*/
2527
public function isPreceededByFuncCall(Tokens $tokens, int $position): bool
28+
{
29+
return $this->isPrecededByFuncCall($tokens, $position);
30+
}
31+
32+
/**
33+
* Matches e.g: return app()->some(), app()->some(), (clone app)->some()
34+
*
35+
* @param Tokens<Token> $tokens
36+
*/
37+
public function isPrecededByFuncCall(Tokens $tokens, int $position): bool
2638
{
2739
for ($i = $position; $i >= 0; --$i) {
2840
/** @var Token $currentToken */

0 commit comments

Comments
 (0)