From 6d2d12b9b7bf4e945b9cd2ba88db6913f2f90589 Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Thu, 7 Sep 2017 15:56:49 +0200 Subject: [PATCH] [TriggerExtractor] add arguments to ClassMethodDeprecation --- .../src/Deprecation/ClassMethodDeprecation.php | 16 +++++++++++++++- .../Deprecation/DeprecationInterface.php | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/TriggerExtractor/src/Deprecation/ClassMethodDeprecation.php b/packages/TriggerExtractor/src/Deprecation/ClassMethodDeprecation.php index c7e3a20fc83..1e64d2c32e9 100644 --- a/packages/TriggerExtractor/src/Deprecation/ClassMethodDeprecation.php +++ b/packages/TriggerExtractor/src/Deprecation/ClassMethodDeprecation.php @@ -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; + } } diff --git a/src/Contract/Deprecation/DeprecationInterface.php b/src/Contract/Deprecation/DeprecationInterface.php index 3860066a994..aa858c37ef4 100644 --- a/src/Contract/Deprecation/DeprecationInterface.php +++ b/src/Contract/Deprecation/DeprecationInterface.php @@ -2,7 +2,7 @@ namespace Rector\Contract\Deprecation; -use Rector\Deprecation\SetNames; +use Rector\Rector\Set\SetNames; interface DeprecationInterface {