Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions rules/Arguments/ArgumentDefaultValueReplacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use Rector\Arguments\Contract\ReplaceArgumentDefaultValueInterface;
use Rector\Arguments\ValueObject\ReplaceArgumentDefaultValue;
use Rector\NodeAnalyzer\ArgsAnalyzer;
use Rector\NodeTypeResolver\NodeTypeResolver;
use Rector\PhpParser\Node\NodeFactory;
Expand Down Expand Up @@ -63,7 +62,7 @@ public function processReplaces(
private function isDefaultValueMatched(?Expr $expr, mixed $value): bool
{
// allow any values before, also allow param without default value
if ($value === ReplaceArgumentDefaultValue::ANY_VALUE_BEFORE) {
if ($value === ReplaceArgumentDefaultValueInterface::ANY_VALUE_BEFORE) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

interface ReplaceArgumentDefaultValueInterface
{
public const string ANY_VALUE_BEFORE = '*ANY_VALUE_BEFORE*';

public function getPosition(): int;

public function getValueBefore(): mixed;
Expand Down
4 changes: 1 addition & 3 deletions rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
use Rector\Validation\RectorAssert;

/**
* @api used in rector-symfony
* @deprecated Use custom rule instead, see ReplaceArgumentDefaultValueRector deprecation.
*/
final readonly class ReplaceArgumentDefaultValue implements ReplaceArgumentDefaultValueInterface
{
public const string ANY_VALUE_BEFORE = '*ANY_VALUE_BEFORE*';

/**
* @param int<0, max> $position
*/
Expand Down
Loading