Skip to content

Commit c82d819

Browse files
authored
Merge branch 'master' into feature/removes-lgtm
2 parents a96df05 + 2a3580b commit c82d819

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/Plugin.php

+14-13
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static function getSubscribedEvents()
9696
*/
9797
public function onDependenciesChangedEvent()
9898
{
99-
if ($this->isPHPCodeSnifferInstalled() === true ) {
99+
if ($this->isPHPCodeSnifferInstalled() === true) {
100100
$installPathCleaned = $this->cleanInstalledPaths();
101101
$installPathUpdated = $this->updateInstalledPaths();
102102

@@ -115,18 +115,19 @@ public function onDependenciesChangedEvent()
115115
*/
116116
private function loadInstalledPaths()
117117
{
118-
119-
$output = $this->processBuilder
120-
->setArguments(['--config-show', 'installed_paths'])
121-
->getProcess()
122-
->mustRun()
123-
->getOutput();
124-
125-
$phpcsInstalledPaths = str_replace('installed_paths: ', '', $output);
126-
$phpcsInstalledPaths = trim($phpcsInstalledPaths);
127-
128-
if ($phpcsInstalledPaths !== '') {
129-
$this->installedPaths = explode(',', $phpcsInstalledPaths);
118+
if ($this->isPHPCodeSnifferInstalled() === true) {
119+
$output = $this->processBuilder
120+
->setArguments(['--config-show', 'installed_paths'])
121+
->getProcess()
122+
->mustRun()
123+
->getOutput();
124+
125+
$phpcsInstalledPaths = str_replace('installed_paths: ', '', $output);
126+
$phpcsInstalledPaths = trim($phpcsInstalledPaths);
127+
128+
if ($phpcsInstalledPaths !== '') {
129+
$this->installedPaths = explode(',', $phpcsInstalledPaths);
130+
}
130131
}
131132
}
132133

0 commit comments

Comments
 (0)