Skip to content

Commit

Permalink
Merge branch 'master' into feature/removes-lgtm
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Feb 5, 2017
2 parents a96df05 + 2a3580b commit c82d819
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static function getSubscribedEvents()
*/
public function onDependenciesChangedEvent()
{
if ($this->isPHPCodeSnifferInstalled() === true ) {
if ($this->isPHPCodeSnifferInstalled() === true) {
$installPathCleaned = $this->cleanInstalledPaths();
$installPathUpdated = $this->updateInstalledPaths();

Expand All @@ -115,18 +115,19 @@ public function onDependenciesChangedEvent()
*/
private function loadInstalledPaths()
{

$output = $this->processBuilder
->setArguments(['--config-show', 'installed_paths'])
->getProcess()
->mustRun()
->getOutput();

$phpcsInstalledPaths = str_replace('installed_paths: ', '', $output);
$phpcsInstalledPaths = trim($phpcsInstalledPaths);

if ($phpcsInstalledPaths !== '') {
$this->installedPaths = explode(',', $phpcsInstalledPaths);
if ($this->isPHPCodeSnifferInstalled() === true) {
$output = $this->processBuilder
->setArguments(['--config-show', 'installed_paths'])
->getProcess()
->mustRun()
->getOutput();

$phpcsInstalledPaths = str_replace('installed_paths: ', '', $output);
$phpcsInstalledPaths = trim($phpcsInstalledPaths);

if ($phpcsInstalledPaths !== '') {
$this->installedPaths = explode(',', $phpcsInstalledPaths);
}
}
}

Expand Down

0 comments on commit c82d819

Please sign in to comment.