diff --git a/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/name_and_hidden.php.inc b/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/name_and_hidden.php.inc new file mode 100644 index 00000000..07bcf78d --- /dev/null +++ b/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/name_and_hidden.php.inc @@ -0,0 +1,29 @@ +setName('sunshine'); + $this->setAliases(['first', 'second']) + ->setHidden(true); + } +} + +?> +----- + diff --git a/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/name_and_hidden_false.php.inc b/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/name_and_hidden_false.php.inc new file mode 100644 index 00000000..4bbb35b8 --- /dev/null +++ b/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/name_and_hidden_false.php.inc @@ -0,0 +1,28 @@ +setHidden(false); + $this->setName('sunshine'); + } +} + +?> +----- + diff --git a/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/other-calls-middle.php.inc b/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/other-calls-middle.php.inc new file mode 100644 index 00000000..f5bad67f --- /dev/null +++ b/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/other-calls-middle.php.inc @@ -0,0 +1,31 @@ +setName('sunshine') + ->addArgument('argument name') + ->setAliases(['first', 'second']); + } +} + +?> +----- +addArgument('argument name'); + } +} + +?> diff --git a/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/other-calls.php.inc b/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/other-calls.php.inc new file mode 100644 index 00000000..39b4ca59 --- /dev/null +++ b/rules-tests/Symfony61/Rector/Class_/CommandConfigureToAttributeRector/Fixture/other-calls.php.inc @@ -0,0 +1,31 @@ +setName('sunshine') + ->setAliases(['first', 'second']) + ->addArgument('argument name'); + } +} + +?> +----- +addArgument('argument name'); + } +} + +?> diff --git a/rules/Symfony61/Rector/Class_/CommandConfigureToAttributeRector.php b/rules/Symfony61/Rector/Class_/CommandConfigureToAttributeRector.php index 53f50dde..512cb443 100644 --- a/rules/Symfony61/Rector/Class_/CommandConfigureToAttributeRector.php +++ b/rules/Symfony61/Rector/Class_/CommandConfigureToAttributeRector.php @@ -39,6 +39,7 @@ final class CommandConfigureToAttributeRector extends AbstractRector implements 'setName' => 'name', 'setDescription' => 'description', 'setAliases' => 'aliases', + 'setHidden' => 'hidden', ]; public function __construct(