Skip to content

Commit

Permalink
Fix doc block and lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 30, 2017
1 parent 457f1b9 commit 3d6b3eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/Console/Command.php
Expand Up @@ -18,8 +18,8 @@
use Cake\Datasource\ModelAwareTrait;
use Cake\Log\LogTrait;
use Cake\ORM\Locator\LocatorAwareTrait;
use RuntimeException;
use InvalidArgumentException;
use RuntimeException;

/**
* Base class for console commands.
Expand Down Expand Up @@ -150,7 +150,8 @@ public function initialize()
/**
* Run the command.
*
* @param array $argv
* @param array $argv Arguments from the CLI environment.
* @param \Cake\Console\ConsoleIo $io The console io
* @return int|null Exit code or null for success.
*/
public function run(array $argv, ConsoleIo $io)
Expand All @@ -175,6 +176,7 @@ public function run(array $argv, ConsoleIo $io)
if ($args->getOption('help')) {
return $this->displayHelp($parser, $args, $io);
}

return $this->execute($args, $io);
}

Expand All @@ -194,7 +196,7 @@ protected function displayHelp(ConsoleOptionParser $parser, Arguments $args, Con
$io->setOutputAs(ConsoleOutput::RAW);
}

return $io->out($parser->help(null, $format));
$io->out($parser->help(null, $format));
}

/**
Expand Down Expand Up @@ -226,5 +228,6 @@ protected function setOutputLevel(Arguments $args, ConsoleIo $io)
*/
public function execute(Arguments $args, ConsoleIo $io)
{
return null;
}
}
2 changes: 1 addition & 1 deletion src/Console/CommandRunner.php
Expand Up @@ -224,6 +224,7 @@ protected function runShell(Shell $shell, array $argv)
{
try {
$shell->initialize();

return $shell->runCommand($argv, true);
} catch (StopException $e) {
return $e->getCode();
Expand All @@ -234,7 +235,6 @@ protected function runShell(Shell $shell, array $argv)
* The wrapper for creating shell instances.
*
* @param string $className Shell class name.
* @param string $name The name of the command.
* @param \Cake\Console\ConsoleIo $io The IO wrapper for the created shell class.
* @return \Cake\Console\Shell
*/
Expand Down

0 comments on commit 3d6b3eb

Please sign in to comment.