Skip to content

Commit 046c1b1

Browse files
ArshidArshid
authored andcommitted
DowngradeMbStrContainsRector
1 parent cdb3f07 commit 046c1b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsWithMultibyteNeedleRector.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function refactor(Node $node): Identical | NotIdentical | null
8686
$offset = null;
8787

8888
if ($haystack instanceof FuncCall) {
89-
89+
9090
if (! $this->isName($haystack->name, 'mb_substr')) {
9191
return null;
9292
}
@@ -99,9 +99,11 @@ public function refactor(Node $node): Identical | NotIdentical | null
9999
if (isset($substrArg[0]) && ! $substrArg[0] instanceof Arg) {
100100
return null;
101101
}
102+
102103
if (isset($substrArg[1]) && ! $substrArg[1] instanceof Arg) {
103104
return null;
104105
}
106+
105107
$haystack = $substrArg[0];
106108
$offset = $substrArg[1];
107109
}

0 commit comments

Comments
 (0)