Browse Source

Change incorrect 'optional' argument option to 'required'

Corey Taylor 4 years ago
parent
commit
e4e2d2a64b

+ 1 - 1
src/Command/PluginAssetsCopyCommand.php

@@ -71,7 +71,7 @@ class PluginAssetsCopyCommand extends Command
             'Copy plugin assets to app\'s webroot.',
         ])->addArgument('name', [
             'help' => 'A specific plugin you want to copy assets for.',
-            'optional' => true,
+            'required' => false,
         ])->addOption('overwrite', [
             'help' => 'Overwrite existing symlink / folder / files.',
             'default' => false,

+ 1 - 1
src/Command/PluginAssetsRemoveCommand.php

@@ -80,7 +80,7 @@ class PluginAssetsRemoveCommand extends Command
             'Remove plugin assets from app\'s webroot.',
         ])->addArgument('name', [
             'help' => 'A specific plugin you want to remove.',
-            'optional' => true,
+            'required' => false,
         ]);
 
         return $parser;

+ 1 - 1
src/Command/PluginAssetsSymlinkCommand.php

@@ -72,7 +72,7 @@ class PluginAssetsSymlinkCommand extends Command
             'Symlink (copy as fallback) plugin assets to app\'s webroot.',
         ])->addArgument('name', [
             'help' => 'A specific plugin you want to symlink assets for.',
-            'optional' => true,
+            'required' => false,
         ])->addOption('overwrite', [
             'help' => 'Overwrite existing symlink / folder / files.',
             'default' => false,

+ 1 - 1
src/Command/SchemacacheBuildCommand.php

@@ -85,7 +85,7 @@ class SchemacacheBuildCommand extends Command
             'default' => 'default',
         ])->addArgument('name', [
             'help' => 'A specific table you want to refresh cached data for.',
-            'optional' => true,
+            'required' => false,
         ]);
 
         return $parser;

+ 1 - 1
src/Command/SchemacacheClearCommand.php

@@ -85,7 +85,7 @@ class SchemacacheClearCommand extends Command
             'default' => 'default',
         ])->addArgument('name', [
             'help' => 'A specific table you want to clear cached data for.',
-            'optional' => true,
+            'required' => false,
         ]);
 
         return $parser;

+ 1 - 1
tests/TestCase/Command/PluginAssetsCommandsTest.php

@@ -117,7 +117,7 @@ class PluginAssetsCommandsTest extends TestCase
             ->addMethods(['in'])
             ->getMock();
         $parser = new ConsoleOptionParser('cake example');
-        $parser->addArgument('name', ['optional' => true]);
+        $parser->addArgument('name', ['required' => false]);
         $parser->addOption('overwrite', ['default' => false, 'boolean' => true]);
 
         $command = $this->getMockBuilder('Cake\Command\PluginAssetsSymlinkCommand')