Skip to content
Snippets Groups Projects
Commit 9456a09c authored by Daniel Hürtgen's avatar Daniel Hürtgen
Browse files

TASK: Shorten several soruce & destination variable names

parent ee279de1
No related merge requests found
...@@ -66,12 +66,12 @@ class Installer extends LibraryInstaller ...@@ -66,12 +66,12 @@ class Installer extends LibraryInstaller
if (!parent::isInstalled($repo, $package)) { if (!parent::isInstalled($repo, $package)) {
return false; return false;
} }
$sourceStandards = $this->getSourceStandards($package); $srcStandards = $this->getSourceStandards($package);
$destinationStandards = $this->getDestinationStandards($repo); $dstStandards = $this->getDestinationStandards($repo);
foreach ($sourceStandards as $sourceStandard) { foreach ($srcStandards as $srcStandard) {
if (!$destinationStandards->hasStandard($sourceStandard) if (!$dstStandards->hasStandard($srcStandard)
|| !$this->compareStandards($sourceStandard, $destinationStandards->getStandard($sourceStandard)) || !$this->compareStandards($srcStandard, $dstStandards->getStandard($srcStandard))
) { ) {
return false; return false;
} }
...@@ -122,14 +122,14 @@ class Installer extends LibraryInstaller ...@@ -122,14 +122,14 @@ class Installer extends LibraryInstaller
$override = false $override = false
) { ) {
$filesystem = new SymfonyFilesystem(); $filesystem = new SymfonyFilesystem();
$sourceStandards = $this->getSourceStandards($package); $srcStandards = $this->getSourceStandards($package);
$destStandardsBasePath = $this->getPHPCodeSnifferStandardsBasePath($repo); $dstStdBasePath = $this->getPHPCodeSnifferStandardsBasePath($repo);
$this->io->writeError(' Installing PHP-CodeSniffer Standards:', false); $this->io->writeError(' Installing PHP-CodeSniffer Standards:', false);
foreach ($sourceStandards as $sourceStandard) { foreach ($srcStandards as $srcStandard) {
$this->io->writeError(sprintf(' <info>%s</info>', $sourceStandard->getName())); $this->io->writeError(sprintf(' <info>%s</info>', $srcStandard->getName()));
$sourcePath = $sourceStandard->getPath(); $srcPath = $srcStandard->getPath();
$destPath = $destStandardsBasePath . DIRECTORY_SEPARATOR . $sourceStandard->getName(); $dstPath = $dstStdBasePath . DIRECTORY_SEPARATOR . $srcStandard->getName();
$filesystem->mirror($sourcePath, $destPath, null, array('override' => $override)); $filesystem->mirror($srcPath, $dstPath, null, array('override' => $override));
} }
} }
...@@ -140,17 +140,17 @@ class Installer extends LibraryInstaller ...@@ -140,17 +140,17 @@ class Installer extends LibraryInstaller
*/ */
protected function removeStandards(InstalledRepositoryInterface $repo, PackageInterface $package) protected function removeStandards(InstalledRepositoryInterface $repo, PackageInterface $package)
{ {
$sourceStandards = $this->getSourceStandards($package); $srcStandards = $this->getSourceStandards($package);
$destinationStandards = $this->getDestinationStandards($repo); $dstStandards = $this->getDestinationStandards($repo);
$this->io->writeError(' Removing PHP-CodeSniffer Standards:', false); $this->io->writeError(' Removing PHP-CodeSniffer Standards:', false);
foreach ($sourceStandards as $sourceStandard) { foreach ($srcStandards as $srcStandard) {
if (!$destinationStandards->hasStandard($sourceStandard)) { if (!$dstStandards->hasStandard($srcStandard)) {
continue; continue;
} }
$this->io->writeError(sprintf(' <info>%s</info>', $sourceStandard->getName())); $this->io->writeError(sprintf(' <info>%s</info>', $srcStandard->getName()));
$destinationStandard = $destinationStandards->getStandard($sourceStandard); $dstStandard = $dstStandards->getStandard($srcStandard);
$this->filesystem->removeDirectory($destinationStandard->getPath()); $this->filesystem->removeDirectory($dstStandard->getPath());
} }
} }
......
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