Skip to content

Commit

Permalink
add more fixtures for RemoveUselessParamTagRector (#3585)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Apr 8, 2023
1 parent dbb0e19 commit 77a3c02
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture;

use Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Source\SomeConstantFloatType;

final class KeepConstantFloatType
{
/**
* @param SomeConstantFloatType::* $type
*/
public function run(float $type)
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture;

use Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Source\SomeConstantIntegerType;

final class KeepConstantIntegerType
{
/**
* @param SomeConstantIntegerType::* $type
*/
public function run(int $type)
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Fixture;

use Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Source\SomeConstantType;

final class KeepConstantType
{
/**
* @param SomeConstantType::* $type
*/
public function run(string $type)
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Source;

final class SomeConstantFloatType
{
public const ONE_HALF = 1.5;

public const TWO_HALF = 2.5;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Source;

final class SomeConstantIntegerType
{
public const ONE = 1;

public const TWO = 2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector\Source;

final class SomeConstantType
{
public const YES = 'yes';

public const NO = 'no';
}

0 comments on commit 77a3c02

Please sign in to comment.