mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-13 12:33:52 +01:00
fix stinfy str needless for return strings
This commit is contained in:
parent
affe5aef5f
commit
60f152a1a5
@ -3,7 +3,6 @@
|
||||
namespace Rector\CodingStyle\Rector\Assign;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
use PhpParser\Node\Expr\AssignOp\Minus;
|
||||
use PhpParser\Node\Expr\AssignOp\Plus;
|
||||
use PhpParser\Node\Expr\PreDec;
|
||||
@ -53,10 +52,7 @@ PHP
|
||||
*/
|
||||
public function getNodeTypes(): array
|
||||
{
|
||||
return [
|
||||
Plus::class,
|
||||
Minus::class
|
||||
];
|
||||
return [Plus::class, Minus::class];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,7 @@ namespace Rector\Php73\Rector\FuncCall;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\Cast\String_;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PHPStan\Type\Constant\ConstantStringType;
|
||||
use PHPStan\Type\StringType;
|
||||
use Rector\Rector\AbstractRector;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
@ -70,7 +70,7 @@ PHP
|
||||
$needleArgNode = $node->args[1]->value;
|
||||
|
||||
$nodeStaticType = $this->getStaticType($needleArgNode);
|
||||
if ($nodeStaticType instanceof ConstantStringType) {
|
||||
if ($nodeStaticType instanceof StringType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user