Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes duplicate declaration of cwd #75

Merged
merged 1 commit into from Oct 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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