Skip to content

Commit

Permalink
🚑 Fixes duplicate declaration of cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Oct 26, 2018
1 parent 1abca7b commit 374914b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Plugin.php
Expand Up @@ -77,11 +77,6 @@ class Plugin implements PluginInterface, EventSubscriberInterface
*/
private $processExecutor;

/**
* @var string
*/
private $cwd;

/**
* Triggers the plugin's main functionality.
*
Expand Down Expand Up @@ -139,7 +134,6 @@ private function init()

$this->processExecutor = new ProcessExecutor($this->io);
$this->filesystem = new Filesystem($this->processExecutor);
$this->cwd = getcwd();
}

/**
Expand Down Expand Up @@ -324,7 +318,7 @@ private function updateInstalledPaths()
$standardsPath = $ruleset->getPath();

// Pick the directory above the directory containing the standard, unless this is the project root.
if ($standardsPath !== getcwd()) {
if ($standardsPath !== $this->cwd) {
$standardsPath = dirname($standardsPath);
}

Expand Down

0 comments on commit 374914b

Please sign in to comment.