diff --git a/src/Plugin.php b/src/Plugin.php index 55fd1974..f6eaddcd 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -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(); @@ -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); + } } }