mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
[TriggerExtractor] add arguments to ClassMethodDeprecation
This commit is contained in:
parent
acb27015fa
commit
6d2d12b9b7
@ -21,11 +21,17 @@ final class ClassMethodDeprecation implements DeprecationInterface
|
||||
*/
|
||||
private $newMethod;
|
||||
|
||||
public function __construct(string $class, string $oldMethod, string $newMethod)
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $newArguments = [];
|
||||
|
||||
public function __construct(string $class, string $oldMethod, string $newMethod, array $newArguments = [])
|
||||
{
|
||||
$this->class = $class;
|
||||
$this->oldMethod = $oldMethod;
|
||||
$this->newMethod = $newMethod;
|
||||
$this->newArguments = $newArguments;
|
||||
}
|
||||
|
||||
public function getClass(): string
|
||||
@ -42,4 +48,12 @@ final class ClassMethodDeprecation implements DeprecationInterface
|
||||
{
|
||||
return $this->newMethod;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getNewArguments(): array
|
||||
{
|
||||
return $this->newArguments;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Rector\Contract\Deprecation;
|
||||
|
||||
use Rector\Deprecation\SetNames;
|
||||
use Rector\Rector\Set\SetNames;
|
||||
|
||||
interface DeprecationInterface
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user