mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-21 16:02:23 +02:00
[CodeQuality] Fix StrlenZeroToIdenticalEmptyStringRector skipping non-matching binary
This commit is contained in:
parent
b0e58e8b40
commit
d3115e8b8a
@ -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
|
||||
|
@ -917,7 +917,7 @@ if (true) {
|
||||
|
||||
```php
|
||||
?>
|
||||
<strong>feel</strong><?php
|
||||
<strong>feel</strong><?php
|
||||
```
|
||||
<br>
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user