fix stinfy str needless for return strings

This commit is contained in:
Tomas Votruba 2019-10-04 14:05:22 +02:00
parent affe5aef5f
commit 60f152a1a5
2 changed files with 3 additions and 7 deletions

View File

@ -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];
}
/**

View File

@ -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;
}