Skip to content
Snippets Groups Projects
Unverified Commit 3d36a8fa authored by Daniel Siepmann's avatar Daniel Siepmann
Browse files

TASK: Remove local variable

* As we can use returns instead of local variable.
* This will make it easier to see the return value of the method.
parent e366a408
2 merge requests!37Release 0.4.0,!30Feature/refactor code
Pipeline #85 passed with stage
in 2 minutes and 47 seconds
......@@ -42,9 +42,8 @@ class Installer extends LibraryInstaller
*/
public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
{
$isInstalled = parent::isInstalled($repo, $package);
if (!$isInstalled) {
return $isInstalled;
if (!parent::isInstalled($repo, $package)) {
return false;
}
$sourceStandards = $this->getSourceStandards($package);
$destinationStandards = $this->getDestinationStandards($repo);
......@@ -53,12 +52,11 @@ class Installer extends LibraryInstaller
if (!$destinationStandards->hasStandard($sourceStandard)
|| !$this->compareStandards($sourceStandard, $destinationStandards->getStandard($sourceStandard))
) {
$isInstalled = false;
break;
return false;
}
}
return $isInstalled;
return true;
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment