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