Skip to content

Commit

Permalink
Updated Rector to commit 026398c9e1078cb3ac5cac41767b620872166859
Browse files Browse the repository at this point in the history
rectorphp/rector-src@026398c Remove return type in case of void in RemoveUselessReturnTagRector (#5318)
  • Loading branch information
TomasVotruba committed Dec 3, 2023
1 parent 07dd432 commit ab4ff53
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 116 deletions.
5 changes: 5 additions & 0 deletions rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\DeadCode\PhpDoc;

use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt\ClassMethod;
use PHPStan\Analyser\Scope;
use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode;
Expand Down Expand Up @@ -63,6 +64,10 @@ public function isDead(ReturnTagValueNode $returnTagValueNode, ClassMethod $clas
if ($scope instanceof Scope && $scope->isInTrait() && $returnTagValueNode->type instanceof ThisTypeNode) {
return \false;
}
// in case of void, there is no added value in @return tag
if ($returnType instanceof Identifier && $returnType->toString() === 'void') {
return \true;
}
if (!$this->typeComparator->arePhpParserAndPhpStanPhpDocTypesEqual($returnType, $returnTagValueNode->type, $classMethod)) {
return $returnTagValueNode->type instanceof IdentifierTypeNode && (string) $returnTagValueNode->type === 'void';
}
Expand Down
51 changes: 0 additions & 51 deletions rules/Php71/Rector/FuncCall/CountOnNullRector.php

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'b8e6818ed04f3aa07218569509bd819db3649820';
public const PACKAGE_VERSION = '026398c9e1078cb3ac5cac41767b620872166859';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-12-03 18:41:40';
public const RELEASE_DATE = '2023-12-03 20:08:03';
/**
* @var int
*/
Expand Down
2 changes: 0 additions & 2 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,6 @@
'Rector\\Php71\\Rector\\BinaryOp\\BinaryOpBetweenNumberAndStringRector' => $baseDir . '/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php',
'Rector\\Php71\\Rector\\BooleanOr\\IsIterableRector' => $baseDir . '/rules/Php71/Rector/BooleanOr/IsIterableRector.php',
'Rector\\Php71\\Rector\\ClassConst\\PublicConstantVisibilityRector' => $baseDir . '/rules/Php71/Rector/ClassConst/PublicConstantVisibilityRector.php',
'Rector\\Php71\\Rector\\FuncCall\\CountOnNullRector' => $baseDir . '/rules/Php71/Rector/FuncCall/CountOnNullRector.php',
'Rector\\Php71\\Rector\\FuncCall\\RemoveExtraParametersRector' => $baseDir . '/rules/Php71/Rector/FuncCall/RemoveExtraParametersRector.php',
'Rector\\Php71\\Rector\\List_\\ListToArrayDestructRector' => $baseDir . '/rules/Php71/Rector/List_/ListToArrayDestructRector.php',
'Rector\\Php71\\Rector\\TryCatch\\MultiExceptionCatchRector' => $baseDir . '/rules/Php71/Rector/TryCatch/MultiExceptionCatchRector.php',
Expand Down Expand Up @@ -2340,7 +2339,6 @@
'Rector\\TypeDeclaration\\Rector\\Property\\AddPropertyTypeDeclarationRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/AddPropertyTypeDeclarationRector.php',
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromAssignsRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromAssignsRector.php',
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictConstructorRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php',
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictGetterMethodReturnTypeRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php',
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictSetUpRector' => $baseDir . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictSetUpRector.php',
'Rector\\TypeDeclaration\\Rector\\StmtsAwareInterface\\DeclareStrictTypesRector' => $baseDir . '/rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php',
'Rector\\TypeDeclaration\\Rector\\While_\\WhileNullableToInstanceofRector' => $baseDir . '/rules/TypeDeclaration/Rector/While_/WhileNullableToInstanceofRector.php',
Expand Down
2 changes: 0 additions & 2 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,6 @@ class ComposerStaticInita55c41c7fa52abd86138c6f32df1d185
'Rector\\Php71\\Rector\\BinaryOp\\BinaryOpBetweenNumberAndStringRector' => __DIR__ . '/../..' . '/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php',
'Rector\\Php71\\Rector\\BooleanOr\\IsIterableRector' => __DIR__ . '/../..' . '/rules/Php71/Rector/BooleanOr/IsIterableRector.php',
'Rector\\Php71\\Rector\\ClassConst\\PublicConstantVisibilityRector' => __DIR__ . '/../..' . '/rules/Php71/Rector/ClassConst/PublicConstantVisibilityRector.php',
'Rector\\Php71\\Rector\\FuncCall\\CountOnNullRector' => __DIR__ . '/../..' . '/rules/Php71/Rector/FuncCall/CountOnNullRector.php',
'Rector\\Php71\\Rector\\FuncCall\\RemoveExtraParametersRector' => __DIR__ . '/../..' . '/rules/Php71/Rector/FuncCall/RemoveExtraParametersRector.php',
'Rector\\Php71\\Rector\\List_\\ListToArrayDestructRector' => __DIR__ . '/../..' . '/rules/Php71/Rector/List_/ListToArrayDestructRector.php',
'Rector\\Php71\\Rector\\TryCatch\\MultiExceptionCatchRector' => __DIR__ . '/../..' . '/rules/Php71/Rector/TryCatch/MultiExceptionCatchRector.php',
Expand Down Expand Up @@ -2558,7 +2557,6 @@ class ComposerStaticInita55c41c7fa52abd86138c6f32df1d185
'Rector\\TypeDeclaration\\Rector\\Property\\AddPropertyTypeDeclarationRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/AddPropertyTypeDeclarationRector.php',
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromAssignsRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromAssignsRector.php',
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictConstructorRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php',
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictGetterMethodReturnTypeRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php',
'Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictSetUpRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictSetUpRector.php',
'Rector\\TypeDeclaration\\Rector\\StmtsAwareInterface\\DeclareStrictTypesRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php',
'Rector\\TypeDeclaration\\Rector\\While_\\WhileNullableToInstanceofRector' => __DIR__ . '/../..' . '/rules/TypeDeclaration/Rector/While_/WhileNullableToInstanceofRector.php',
Expand Down

0 comments on commit ab4ff53

Please sign in to comment.