mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-03 15:12:30 +02:00
commit
048f6eebea
@ -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 */
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Rector\Tests\PhpParser\Node\Value;
|
||||
|
||||
use Generator;
|
||||
use Iterator;
|
||||
use PhpParser\BuilderFactory;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\BinaryOp\Plus;
|
||||
@ -28,17 +28,13 @@ final class ValueResolverTest extends AbstractKernelTestCase
|
||||
/**
|
||||
* @dataProvider dataProvider
|
||||
* @param mixed $expected
|
||||
* @param Expr $expr
|
||||
*/
|
||||
public function test($expected, Expr $expr): void
|
||||
{
|
||||
$this->assertSame($expected, $this->valueResolver->resolve($expr));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Generator
|
||||
*/
|
||||
public function dataProvider(): Generator
|
||||
public function dataProvider(): Iterator
|
||||
{
|
||||
$builderFactory = new BuilderFactory();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user