From 105bf5845f17b336c9a62fbd3e576eaea0eb91d5 Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Mon, 17 Oct 2016 09:55:41 -0700 Subject: [PATCH] [console] Apply PSR-2 code style. (#66) --- composer.lock | 10 +++++----- src/Command/AboutCommand.php | 16 ++++++++-------- src/Command/InitCommand.php | 2 +- .../ShowGeneratedFilesListener.php | 4 ++-- src/Utils/ConfigurationManager.php | 3 ++- src/Utils/ShowFile.php | 4 ++-- src/Utils/TwigRenderer.php | 4 ++-- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/composer.lock b/composer.lock index c2982ba..c2902bd 100644 --- a/composer.lock +++ b/composer.lock @@ -175,16 +175,16 @@ }, { "name": "drupal/console-en", - "version": "1.0.0-rc1", + "version": "1.0.0-rc2", "source": { "type": "git", "url": "https://github.com/hechoendrupal/drupal-console-en.git", - "reference": "2cf5746d56aab2a2b16f09f1875be6456363055f" + "reference": "d95f7673ce0d3253efb7ce054a2bf13e6cf9c773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console-en/zipball/2cf5746d56aab2a2b16f09f1875be6456363055f", - "reference": "2cf5746d56aab2a2b16f09f1875be6456363055f", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console-en/zipball/d95f7673ce0d3253efb7ce054a2bf13e6cf9c773", + "reference": "d95f7673ce0d3253efb7ce054a2bf13e6cf9c773", "shasum": "" }, "type": "drupal-console-language", @@ -225,7 +225,7 @@ "drupal", "symfony" ], - "time": "2016-09-23 07:54:23" + "time": "2016-10-17 16:30:14" }, { "name": "stecman/symfony-console-completion", diff --git a/src/Command/AboutCommand.php b/src/Command/AboutCommand.php index bd2fe8b..d4ee783 100644 --- a/src/Command/AboutCommand.php +++ b/src/Command/AboutCommand.php @@ -50,14 +50,14 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->trans('commands.init.description'), 'drupal init --override --no-interaction' ], -// 'quick-start' => [ -// $this->trans('commands.common.messages.quick-start'), -// 'drupal chain --file=~/.console/chain/quick-start.yml' -// ], -// 'site-new' => [ -// $this->trans('commands.site.new.description'), -// 'drupal site:new drupal8.dev --latest' -// ], + // 'quick-start' => [ + // $this->trans('commands.common.messages.quick-start'), + // 'drupal chain --file=~/.console/chain/quick-start.yml' + // ], + // 'site-new' => [ + // $this->trans('commands.site.new.description'), + // 'drupal site:new drupal8.dev --latest' + // ], 'site-install' => [ $this->trans('commands.site.install.description'), sprintf( diff --git a/src/Command/InitCommand.php b/src/Command/InitCommand.php index 719120f..10e37e2 100644 --- a/src/Command/InitCommand.php +++ b/src/Command/InitCommand.php @@ -113,7 +113,7 @@ protected function interact(InputInterface $input, OutputInterface $output) if ($local) { $root = null; - foreach($this->webRootDirectories as $webRootDirectory) { + foreach ($this->webRootDirectories as $webRootDirectory) { if (!$root && is_dir(getcwd().'/'.$webRootDirectory)) { $root = $webRootDirectory; } diff --git a/src/EventSubscriber/ShowGeneratedFilesListener.php b/src/EventSubscriber/ShowGeneratedFilesListener.php index 4a29990..d3d1bfe 100644 --- a/src/EventSubscriber/ShowGeneratedFilesListener.php +++ b/src/EventSubscriber/ShowGeneratedFilesListener.php @@ -17,7 +17,6 @@ class ShowGeneratedFilesListener implements EventSubscriberInterface { - /** * @var FileQueue */ @@ -35,7 +34,8 @@ class ShowGeneratedFilesListener implements EventSubscriberInterface * @param FileQueue $fileQueue * @param ShowFile $showFile */ - public function __construct(FileQueue $fileQueue, ShowFile $showFile) { + public function __construct(FileQueue $fileQueue, ShowFile $showFile) + { $this->fileQueue = $fileQueue; $this->showFile = $showFile; } diff --git a/src/Utils/ConfigurationManager.php b/src/Utils/ConfigurationManager.php index a1c44d9..c077d6a 100644 --- a/src/Utils/ConfigurationManager.php +++ b/src/Utils/ConfigurationManager.php @@ -93,7 +93,8 @@ public function getConfiguration() return $this->configuration; } - public function readSite($siteFile) { + public function readSite($siteFile) + { if (!file_exists($siteFile)) { return []; } diff --git a/src/Utils/ShowFile.php b/src/Utils/ShowFile.php index 4fb7392..8f8c4c8 100644 --- a/src/Utils/ShowFile.php +++ b/src/Utils/ShowFile.php @@ -40,7 +40,7 @@ public function generatedFiles($io, $files, $showPath = true) { $pathKey = null; $path = null; - if ($showPath){ + if ($showPath) { $pathKey = 'application.user.messages.path'; $path = $this->root; } @@ -62,7 +62,7 @@ public function copiedFiles($io, $files, $showPath = true) { $pathKey = null; $path = null; - if ($showPath){ + if ($showPath) { $pathKey = 'application.user.messages.path'; $path = rtrim(getenv('HOME') ?: getenv('USERPROFILE'), '/\\').'/.console/'; } diff --git a/src/Utils/TwigRenderer.php b/src/Utils/TwigRenderer.php index 21e067a..f46257a 100644 --- a/src/Utils/TwigRenderer.php +++ b/src/Utils/TwigRenderer.php @@ -25,12 +25,12 @@ class TwigRenderer /** * TwigRenderer constructor. * @param $translator - * @param StringConverter $stringConverter + * @param StringConverter $stringConverter */ public function __construct( $translator, StringConverter $stringConverter - ){ + ) { $this->translator = $translator; $this->stringConverter = $stringConverter; }