Skip to content

Commit

Permalink
Implemented #115: Remove supporting excluding file extensions
Browse files Browse the repository at this point in the history
- Removed deprecated lists.
  • Loading branch information
andkirby committed Aug 30, 2016
1 parent e6993ac commit e579392
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
6 changes: 0 additions & 6 deletions src/lib/PreCommit/Console/Command/Config/File/Allow.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ protected function getKey()
*/
protected function showSetValues()
{
$this->key = 'allow-path';
$this->processValue();

$this->key = 'allow-file';
$this->processValue();

$this->key = 'allow';
$this->processValue();

Expand Down
20 changes: 12 additions & 8 deletions src/lib/PreCommit/Console/Command/Config/File/Protect.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ protected function normalizeValue()
*/
protected function showSetValues()
{
$this->key = 'protect-path';
$this->processValue();

$this->key = 'protect-file';
$this->processValue();

$this->key = 'protect';
$this->processValue();

Expand Down Expand Up @@ -135,6 +129,16 @@ protected function configureInput()
return $this;
}

/**
* Removed using scope.
*
* @return bool
*/
protected function useDefaultScopeByDefault()
{
return true;
}

/**
* Init default helpers
*
Expand Down Expand Up @@ -177,7 +181,7 @@ protected function writePredefinedOptions($readAll = false)
*/
protected function getDefaultScope($xpath, $type)
{
return 2;
return self::OPTION_SCOPE_PROJECT;
}

/**
Expand All @@ -197,7 +201,7 @@ protected function getXpathValue($xpath)
*/
protected function showValue()
{
$value = $this->getShowValue($this->getArgumentXpath());
$value = (array) $this->getConfig()->getNodesExpr($this->getArgumentXpath().'/*');
$value && $this->io->writeln(implode(PHP_EOL, $value));

return $this;
Expand Down

0 comments on commit e579392

Please sign in to comment.