Skip to content

Commit

Permalink
TASK: Eliminate some codeclimate issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mstruebing committed Jul 2, 2017
1 parent 24de305 commit a5e470a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/EditorconfigChecker/Cli/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ protected function getFileNames($fileGlobs, $dotfiles, $excludedPattern)

if ($excludedPattern) {
return $this->filterFiles($fileNames, $excludedPattern);
} else {
return $fileNames;
}

return $fileNames;
}

/**
Expand Down Expand Up @@ -132,6 +132,8 @@ protected function filterFiles($fileNames, $excludedPattern)
*/
protected function getExcludedPatternFromOptions($options)
{
$pattern = false;

if (isset($options['e']) && !isset($options['exclude'])) {
$excludedPattern = $options['e'];
} elseif (!isset($options['e']) && isset($options['exclude'])) {
Expand All @@ -148,8 +150,6 @@ protected function getExcludedPatternFromOptions($options)
} else {
$excludedPattern = [$options['e'], $options['exclude']];
}
} else {
return false;
}

if (is_array($excludedPattern)) {
Expand Down
6 changes: 3 additions & 3 deletions src/EditorconfigChecker/Fix/TrailingWhitespaceFix.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public static function trim($filename, $lineNumber, $eolChar)
$lines = file($filename);
$lines[$lineNumber] = rtrim($lines[$lineNumber]) . $eolChar;

$fp = fopen($filename, 'w');
fwrite($fp, implode('', $lines));
fclose($fp);
$filepointer = fopen($filename, 'w');
fwrite($filepointer, implode('', $lines));
fclose($filepointer);

return true;
}
Expand Down

0 comments on commit a5e470a

Please sign in to comment.