Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Benoth/cssprites
Browse files Browse the repository at this point in the history
  • Loading branch information
lvancrayelynghe committed Dec 17, 2015
2 parents 359f88c + 83d912c commit f85ce88
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/Commands/AbstractBaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ abstract class AbstractBaseCommand extends Command implements ContainerAwareInte
{
use ContainerAwareTrait;

/**
* @param string $option
*
* @return string
*/
protected function getOptionOrAsk($option, $question, $default = null)
{
$value = $this->input->getOption($option);
Expand All @@ -22,6 +27,9 @@ protected function getOptionOrAsk($option, $question, $default = null)
return $value;
}

/**
* @param string $option
*/
protected function getOptionOrSelect($option, $question, array $choices, $default = null)
{
$value = $this->input->getOption($option);
Expand All @@ -39,6 +47,9 @@ protected function getOptionOrSelect($option, $question, array $choices, $defaul
return $value;
}

/**
* @param string $option
*/
protected function getOptionOrAskConfirmation($option, $question, $default = null)
{
$value = $this->input->getOption($option);
Expand All @@ -55,6 +66,11 @@ protected function getOptionOrAskConfirmation($option, $question, $default = nul
return $value;
}

/**
* @param string $option
*
* @return string
*/
protected function getOptionOrAskAndValidate($option, $question, \Closure $callback, $default = null)
{
$value = $this->input->getOption($option);
Expand Down
3 changes: 3 additions & 0 deletions src/Commands/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ protected function getDriver($option)
return $this->getOptionOrSelect('driver', $option['question'], $option['choices'], $option['default']);
}

/**
* @return string
*/
protected function getOutputFilename($option)
{
$filename = $this->getOptionOrAsk('sprite', $option['question'], $option['default']);
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Configuration
/**
* Create a new configuration and set the default values.
*
* @param mixed $value The values
* @param mixed $values The values
*/
public function __construct(array $values = [])
{
Expand Down

0 comments on commit f85ce88

Please sign in to comment.