Skip to content

Commit

Permalink
Fix @template-covariant usage on Target and TargetInterface (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored Nov 11, 2024
1 parent ce22a28 commit 37709b4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPublicMethodParameterRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\DeadCode\Rector\Expression\RemoveDeadStmtRector;
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
Expand Down Expand Up @@ -111,16 +109,6 @@
// ArrayAccess usage
__DIR__ . '/src/Session/tests/SessionTest.php',
],

// nullable @template usage, see https://github.com/rectorphp/rector-src/pull/6409
// can be re-enabled on next rector release
RemoveUselessParamTagRector::class => [
__DIR__ . '/src/Interceptors/src/Context/Target.php',
],

RemoveUselessReturnTagRector::class => [
__DIR__ . '/src/Interceptors/src/Context/TargetInterface.php',
],
])
->withPhpSets(php81: true)
->withPreparedSets(deadCode: true, phpunit: true)
Expand Down
2 changes: 1 addition & 1 deletion src/Interceptors/src/Context/Target.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class Target implements TargetInterface
{
/**
* @param list<string> $path
* @param TController|null $object
* @param TController $object
* @param \Closure|array{class-string|object, non-empty-string}|null $callable
*/
private function __construct(
Expand Down
2 changes: 1 addition & 1 deletion src/Interceptors/src/Context/TargetInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getReflection(): ?\ReflectionFunctionAbstract;
*
* If the object is present, it always corresponds to the method reflection from {@see getReflection()}.
*
* @return TController|null
* @return TController
*/
public function getObject(): ?object;

Expand Down

0 comments on commit 37709b4

Please sign in to comment.