Skip to content

Commit

Permalink
Merge pull request #1 from Benoth/scrutinizer-patch-1
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
lvancrayelynghe committed Oct 30, 2015
2 parents 4f203e1 + dd8fa84 commit 83d912c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
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 @@ -264,6 +264,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
2 changes: 1 addition & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace CSSPrites;

use League\Container\ServiceProvider as BaseServiceProvider;
use CSSPrites\ImageProcessor\ImageProcessorInterface;
use League\Container\ServiceProvider as BaseServiceProvider;

/**
* ServiceProvider to register all the needed dependencies.
Expand Down

0 comments on commit 83d912c

Please sign in to comment.