Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Apr 5, 2021
1 parent 0964c82 commit e26e292
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,4 @@ parameters:
paths:
- tests/bootstrap.php

# fix in rector main, should be string only
- '#Parameter \#1 \$desiredClass of method Rector\\BetterPhpDocParser\\PhpDocInfo\\PhpDocInfo<PHPStan\\PhpDocParser\\Ast\\Node\>\:\:getByAnnotationClass\(\) expects class\-string, string given#'
- '#Class with base "ServiceDefinition" name is already used in "(.*?)\\Nette\\DI\\Definitions\\ServiceDefinition", "Rector\\Symfony\\ValueObject\\ServiceDefinition"\. Use unique name to make classes easy to recognize#'
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public function refactor(Node $node): ?Node
$this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $doctrineAnnotationTagValueNode);

// unset service, that is deprecated
$items = $doctrineAnnotationTagValueNode->getItems();
$symfonyRouteTagValueNode = $this->symfonyRouteTagValueNodeFactory->createFromItems($items);
$values = $doctrineAnnotationTagValueNode->getValues();
$symfonyRouteTagValueNode = $this->symfonyRouteTagValueNodeFactory->createFromItems($values);

$phpDocInfo->addTagValueNode($symfonyRouteTagValueNode);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ private function refactorReturnWithValue(
/** @var Expr $lastReturnExpr */
$lastReturnExpr = $return->expr;


$returnStaticType = $this->getStaticType($lastReturnExpr);

// phpstan regression fix
Expand All @@ -309,7 +308,6 @@ private function refactorReturnWithValue(
}
}


$responseObjectType = new ObjectType(self::RESPONSE_CLASS);
if ($responseObjectType->isSuperTypeOf($returnStaticType)->yes()) {
return;
Expand Down
1 change: 0 additions & 1 deletion src/TypeAnalyzer/ArrayUnionResponseTypeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Rector\Symfony\TypeAnalyzer;

use PHPStan\Type\ArrayType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeWithClassName;
use PHPStan\Type\UnionType;
Expand Down

0 comments on commit e26e292

Please sign in to comment.