[TriggerExtractor] add arguments to ClassMethodDeprecation

This commit is contained in:
TomasVotruba 2017-09-07 15:56:49 +02:00
parent acb27015fa
commit 6d2d12b9b7
2 changed files with 16 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -2,7 +2,7 @@
namespace Rector\Contract\Deprecation;
use Rector\Deprecation\SetNames;
use Rector\Rector\Set\SetNames;
interface DeprecationInterface
{