Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / src / Command / Generate / PluginRulesActionCommand.php
index 4163e51ad1934fce8aa2b6c767720a2e7f6e9f17..43785e3d5b0f480c23c1c953b8edb2c393e97358 100644 (file)
@@ -83,35 +83,35 @@ class PluginRulesActionCommand extends Command
             ->setName('generate:plugin:rulesaction')
             ->setDescription($this->trans('commands.generate.plugin.rulesaction.description'))
             ->setHelp($this->trans('commands.generate.plugin.rulesaction.help'))
-            ->addOption('module', '', InputOption::VALUE_REQUIRED, $this->trans('commands.common.options.module'))
+            ->addOption('module', null, InputOption::VALUE_REQUIRED, $this->trans('commands.common.options.module'))
             ->addOption(
                 'class',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.plugin.rulesaction.options.class')
             )
             ->addOption(
                 'label',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.plugin.rulesaction.options.label')
             )
             ->addOption(
                 'plugin-id',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.plugin.rulesaction.options.plugin-id')
             )
-            ->addOption('type', '', InputOption::VALUE_REQUIRED, $this->trans('commands.generate.plugin.rulesaction.options.type'))
+            ->addOption('type', null, InputOption::VALUE_REQUIRED, $this->trans('commands.generate.plugin.rulesaction.options.type'))
             ->addOption(
                 'category',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                 $this->trans('commands.generate.plugin.rulesaction.options.category')
             )
             ->addOption(
                 'context',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.plugin.rulesaction.options.context')
             );
@@ -126,7 +126,7 @@ class PluginRulesActionCommand extends Command
 
         // @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
         if (!$this->confirmGeneration($io)) {
-            return;
+            return 1;
         }
 
         $module = $input->getOption('module');
@@ -140,6 +140,8 @@ class PluginRulesActionCommand extends Command
         $this->generator->generate($module, $class_name, $label, $plugin_id, $category, $context, $type);
 
         $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery']);
+
+        return 0;
     }
 
     protected function interact(InputInterface $input, OutputInterface $output)