[CodeQuality] Fix StrlenZeroToIdenticalEmptyStringRector skipping non-matching binary

This commit is contained in:
Tomas Votruba 2019-07-09 17:06:58 +02:00
parent b0e58e8b40
commit d3115e8b8a
3 changed files with 5 additions and 5 deletions

View File

@ -3547,7 +3547,7 @@ services:
- class: `Rector\Php\Rector\FuncCall\PregReplaceEModifierRector`
The /e modifier is no longer supported, use preg_replace_callback instead
The /e modifier is no longer supported, use preg_replace_callback instead
```diff
class SomeClass

View File

@ -917,7 +917,7 @@ if (true) {
```php
?>
<strong>feel</strong><?php
<strong>feel</strong><?php
```
<br>

View File

@ -64,9 +64,7 @@ CODE_SAMPLE
}
$variable = $node->left->args[0]->value;
}
if ($node->right instanceof FuncCall) {
} elseif ($node->right instanceof FuncCall) {
if (! $this->isName($node->right, 'strlen')) {
return null;
}
@ -76,6 +74,8 @@ CODE_SAMPLE
}
$variable = $node->right->args[0]->value;
} else {
return null;
}
/** @var Expr $variable */