Skip to content

Commit

Permalink
Merge pull request #5 from rahulsonar-acquia/composer_2
Browse files Browse the repository at this point in the history
phpcs
  • Loading branch information
rahulsonar-acquia committed May 25, 2021
2 parents 440602a + 6ed606b commit 9abe69a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Composer/ComposerizeDrupalCommand.php
Expand Up @@ -42,7 +42,7 @@ public function configure()
$this->addOption('composer-root', null, InputOption::VALUE_REQUIRED, 'The relative path to the directory that should contain composer.json.');
$this->addOption('drupal-root', null, InputOption::VALUE_REQUIRED, 'The relative path to the Drupal root directory.');
$this->addOption('exact-versions', null, InputOption::VALUE_NONE, 'Use exact version constraints rather than the recommended caret operator.');
$this->addOption('composer-path',null,InputOption::VALUE_OPTIONAL,'Composer1 path on the system');
$this->addOption('composer-path', null, InputOption::VALUE_OPTIONAL, 'Composer1 path on the system');
$this->addOption('no-update', null, InputOption::VALUE_NONE, 'Prevent "composer update" being run after file generation.');
$this->addOption('no-gitignore', null, InputOption::VALUE_NONE, 'Prevent root .gitignore file from being modified.');
$this->addUsage('--composer-root=. --drupal-root=./docroot');
Expand Down
8 changes: 4 additions & 4 deletions src/Composer/Plugin.php
Expand Up @@ -19,12 +19,12 @@ public function activate(Composer $composer, IOInterface $io)
$this->io = $io;
}

public function deactivate(Composer $composer, IOInterface $io) {

public function deactivate(Composer $composer, IOInterface $io)
{
}

public function uninstall(Composer $composer, IOInterface $io) {

public function uninstall(Composer $composer, IOInterface $io)
{
}

public function getCapabilities()
Expand Down
12 changes: 7 additions & 5 deletions tests/phpunit/src/SandboxManager.php
Expand Up @@ -88,15 +88,17 @@ public function makeSandbox()
*
* @param $dir
*/
private function deleteFolderRecursively($dir):void {
private function deleteFolderRecursively($dir):void
{
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (is_dir($dir. DIRECTORY_SEPARATOR .$object) && !is_link($dir."/".$object))
$this->deleteFolderRecursively($dir. DIRECTORY_SEPARATOR .$object);
else
$this->fs->remove($dir. DIRECTORY_SEPARATOR .$object);
if (is_dir($dir. DIRECTORY_SEPARATOR .$object) && !is_link($dir."/".$object)) {
$this->deleteFolderRecursively($dir . DIRECTORY_SEPARATOR . $object);
} else {
$this->fs->remove($dir . DIRECTORY_SEPARATOR . $object);
}
}
}
$this->fs->remove($dir);
Expand Down

0 comments on commit 9abe69a

Please sign in to comment.