Skip to content

Commit

Permalink
[console] Apply PSR-2 code style. (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Jan 1, 2017
1 parent 077e88e commit ff2b936
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 17 deletions.
10 changes: 10 additions & 0 deletions .php_cs
@@ -0,0 +1,10 @@
<?php

return PhpCsFixer\Config::create()
->setRules(
[
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
]
)
->setUsingCache(false);
16 changes: 8 additions & 8 deletions composer.lock

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

7 changes: 2 additions & 5 deletions phpqa.yml
Expand Up @@ -12,14 +12,11 @@ application:
exception: true
options:
e: 'php'
exclude: vendor/
exclude: /vendor
arguments:
php-cs-fixer:
enabled: true
exception: false
file:
config-file: .php_cs
single-execution: false
options:
level: psr2
arguments:
Expand Down Expand Up @@ -52,7 +49,7 @@ application:
prefixes:
postfixes:
- 'text'
- 'cleancode'
- 'cleancode,codesize,unusedcode,naming,controversial,design'
phploc:
enabled: false
exception: false
Expand Down
2 changes: 2 additions & 0 deletions src/Application.php
Expand Up @@ -10,6 +10,7 @@

/**
* Class Application
*
* @package Drupal\Console
*/
class Application extends CoreApplication
Expand All @@ -26,6 +27,7 @@ class Application extends CoreApplication

/**
* Application constructor.
*
* @param ContainerInterface $container
*/
public function __construct($container)
Expand Down
1 change: 1 addition & 0 deletions src/Command/Self/ManifestStrategy.php
Expand Up @@ -13,6 +13,7 @@

/**
* Class ManifestStrategy
*
* @package Drupal\Console\Launcher\Command\Self
*/
class ManifestStrategy implements StrategyInterface
Expand Down
1 change: 1 addition & 0 deletions src/Command/Self/UpdateCommand.php
Expand Up @@ -17,6 +17,7 @@

/**
* Class UpdateCommand
*
* @package Drupal\Console\Launcher\Command\Self
*/
class UpdateCommand extends Command
Expand Down
9 changes: 5 additions & 4 deletions src/Command/Self/VersionParser.php
Expand Up @@ -19,6 +19,7 @@

/**
* Class VersionParser
*
* @package Drupal\Console\Launcher\Command\Self
*/
class VersionParser
Expand All @@ -36,7 +37,7 @@ class VersionParser
/**
* @param array $versions
*/
public function __construct(array $versions = array())
public function __construct(array $versions = [])
{
$this->versions = $versions;
}
Expand Down Expand Up @@ -125,7 +126,7 @@ public function isDevelopment($version)
*/
private function selectRecentStable()
{
$candidates = array();
$candidates = [];
foreach ($this->versions as $version) {
if (!$this->stable($version)) {
continue;
Expand All @@ -143,7 +144,7 @@ private function selectRecentStable()
*/
private function selectRecentUnstable()
{
$candidates = array();
$candidates = [];
foreach ($this->versions as $version) {
if ($this->stable($version) || $this->development($version)) {
continue;
Expand All @@ -161,7 +162,7 @@ private function selectRecentUnstable()
*/
private function selectRecentAll()
{
$candidates = array();
$candidates = [];
foreach ($this->versions as $version) {
if ($this->development($version)) {
continue;
Expand Down
1 change: 1 addition & 0 deletions src/Utils/Launcher.php
Expand Up @@ -4,6 +4,7 @@

/**
* Class Launcher
*
* @package Drupal\Console\Launcher\Utils
*/
class Launcher
Expand Down
1 change: 1 addition & 0 deletions src/Utils/Remote.php
Expand Up @@ -15,6 +15,7 @@

/**
* Class Remote
*
* @package Drupal\Console\Launcher\Utils
*/
class Remote
Expand Down

0 comments on commit ff2b936

Please sign in to comment.