Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / src / Command / Generate / PluginFieldWidgetCommand.php
index 89817bcad98f01b0faa73e8a8420b28bbc617a24..48618defd1637678b263bedca7fc75b5c0f19450 100644 (file)
@@ -93,28 +93,28 @@ class PluginFieldWidgetCommand extends Command
             ->setName('generate:plugin:fieldwidget')
             ->setDescription($this->trans('commands.generate.plugin.fieldwidget.description'))
             ->setHelp($this->trans('commands.generate.plugin.fieldwidget.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_REQUIRED,
                 $this->trans('commands.generate.plugin.fieldwidget.options.class')
             )
             ->addOption(
                 'label',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.plugin.fieldwidget.options.label')
             )
             ->addOption(
                 'plugin-id',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.plugin.fieldwidget.options.plugin-id')
             )
             ->addOption(
                 'field-type',
-                '',
+                null,
                 InputOption::VALUE_OPTIONAL,
                 $this->trans('commands.generate.plugin.fieldwidget.options.field-type')
             );
@@ -129,7 +129,7 @@ class PluginFieldWidgetCommand extends Command
 
         // @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
         if (!$this->confirmGeneration($io)) {
-            return;
+            return 1;
         }
 
         $module = $input->getOption('module');
@@ -141,6 +141,8 @@ class PluginFieldWidgetCommand extends Command
         $this->generator->generate($module, $class_name, $label, $plugin_id, $field_type);
 
         $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery']);
+
+        return 0;
     }
 
     protected function interact(InputInterface $input, OutputInterface $output)