Skip to content

Commit

Permalink
Fix PHPCS tool wrapper to support builtin standards
Browse files Browse the repository at this point in the history
  • Loading branch information
orlangur committed Feb 25, 2017
1 parent 6533da0 commit 1e7c98c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ class CodeSniffer implements ToolInterface, ExtensionInterface
*/
public function __construct($rulesetDir, $reportFile, Wrapper $wrapper)
{
$this->rulesetDir = file_exists($rulesetDir) ? $rulesetDir : realpath(__DIR__ . '/../../../../' . $rulesetDir);
$this->rulesetDir = $rulesetDir;
if (!file_exists($rulesetDir) && file_exists($fullPath = realpath(__DIR__ . '/../../../../' . $rulesetDir))) {
$this->rulesetDir = $fullPath;
}
$this->reportFile = $reportFile;
$this->wrapper = $wrapper;
}
Expand Down

0 comments on commit 1e7c98c

Please sign in to comment.