Skip to content

Commit

Permalink
[console] Apply PSR-2 code style. (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas authored Oct 17, 2016
1 parent 99ef665 commit 105bf58
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions src/Command/AboutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/Command/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/EventSubscriber/ShowGeneratedFilesListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

class ShowGeneratedFilesListener implements EventSubscriberInterface
{

/**
* @var FileQueue
*/
Expand All @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Utils/ConfigurationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public function getConfiguration()
return $this->configuration;
}

public function readSite($siteFile) {
public function readSite($siteFile)
{
if (!file_exists($siteFile)) {
return [];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/ShowFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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/';
}
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/TwigRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 105bf58

Please sign in to comment.