Skip to content

Commit

Permalink
[PostRector] Fix unused import not removed on empty generic class nam…
Browse files Browse the repository at this point in the history
…e exists (#5012)

* [PostRector] Fix unused import not removed on generic class name exists

* [PostRector] Fix unused import not removed on generic class name exists

* [ci-review] Rector Rectify

* not make @see as part of text

---------

Co-authored-by: GitHub Action <actions@github.com>
  • Loading branch information
samsonasik and actions-user committed Sep 13, 2023
1 parent 935b2b4 commit 74df774
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ public function getGenericTagClassNames(): array
$resolvedClasses = [];

foreach ($genericTagValueNodes as $genericTagValueNode) {
$resolvedClasses[] = $genericTagValueNode->value;
if ($genericTagValueNode->value !== '') {
$resolvedClasses[] = $genericTagValueNode->value;
}
}

return $resolvedClasses;
Expand Down
1 change: 0 additions & 1 deletion packages/Config/RectorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Rector\Core\Contract\Rector\RectorInterface;
use Rector\Core\DependencyInjection\Laravel\ContainerMemento;
use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\FileSystem\FilesystemTweaker;
use Rector\Core\NodeAnalyzer\ScopeAnalyzer;
use Rector\Core\Rector\AbstractScopeAwareRector;
use Rector\Core\ValueObject\PhpVersion;
Expand Down
2 changes: 1 addition & 1 deletion packages/NodeTypeResolver/Node/AttributeKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class AttributeKey
public const VIRTUAL_NODE = 'virtual_node';

/**
* Contains @see Scope
* @see Scope
* @var string
*/
public const SCOPE = 'scope';
Expand Down

0 comments on commit 74df774

Please sign in to comment.