Skip to content

Commit cdbbf49

Browse files
ArshidArshid
authored andcommitted
/DowngradeMbStrContainsRector
1 parent 8b15495 commit cdbbf49

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

rules/DowngradePhp80/Rector/FuncCall/DowngradeMbStrContainsRector.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,26 +80,26 @@ public function refactor(Node $node): Identical | NotIdentical | null
8080
$needle = $args[1]->value;
8181
$offset = null;
8282

83-
if($haystack instanceof FuncCall){
84-
if(!$this->isName($haystack->name, 'mb_substr')){
83+
if ($haystack instanceof FuncCall) {
84+
if (! $this->isName($haystack->name, 'mb_substr')) {
8585
return null;
8686
}
8787
$substrArg = $haystack->getArgs();
88-
if(isset($substrArg[0]) && !$substrArg[0] instanceof Arg){
88+
if (isset($substrArg[0]) && ! $substrArg[0] instanceof Arg) {
8989
return null;
9090
}
91-
if(isset($substrArg[1]) && !$substrArg[1] instanceof Arg){
91+
if (isset($substrArg[1]) && ! $substrArg[1] instanceof Arg) {
9292
return null;
9393
}
9494
$haystack = $substrArg[0];
9595
$offset = $substrArg[1];
9696
}
9797

98-
if($offset instanceof Arg){
98+
if ($offset instanceof Arg) {
9999
$funcCall = $this->nodeFactory->createFuncCall('mb_strpos', [$haystack, $needle, $offset]);
100100
}
101-
102-
if(!$offset instanceof Arg){
101+
102+
if (! $offset instanceof Arg) {
103103
$funcCall = $this->nodeFactory->createFuncCall('mb_strpos', [$haystack, $needle]);
104104
}
105105

0 commit comments

Comments
 (0)