@@ -10,7 +10,6 @@ |
||
10 | 10 | namespace features\Behavior\Context\Console; |
11 | 11 | |
12 | 12 | use features\Behavior\Console as ConsoleBehavior; |
13 | - |
|
14 | 13 | use Hamcrest\MatcherAssert as Matcher; |
15 | 14 | |
16 | 15 | trait CommandContextTrait |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function castCommand($command) |
28 | 28 | { |
29 | - return trim((string)$command); |
|
29 | + return trim((string) $command); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | Matcher::assertThat( |
57 | 57 | sprintf( |
58 | 58 | "Command '%s' should exist", |
59 | - (string)$commandName |
|
59 | + (string) $commandName |
|
60 | 60 | ), |
61 | 61 | $this->getApplication() |
62 | - ->has(trim((string)$commandName)) |
|
62 | + ->has(trim((string) $commandName)) |
|
63 | 63 | ); |
64 | 64 | } |
65 | 65 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | public function iUseOption(string $optionName) |
173 | 173 | { |
174 | - $this->addArgument('--' . $optionName, 1); |
|
174 | + $this->addArgument('--'.$optionName, 1); |
|
175 | 175 | } |
176 | 176 | } |
177 | 177 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * @var array |
30 | 30 | */ |
31 | - protected $arguments = []; |
|
31 | + protected $arguments = [ ]; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @var string |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | { |
98 | 98 | $this->command = null; |
99 | 99 | $this->commandTester = null; |
100 | - $this->arguments = []; |
|
100 | + $this->arguments = [ ]; |
|
101 | 101 | $this->argumentString = null; |
102 | 102 | } |
103 | 103 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function addArgument(string $name, $value) |
117 | 117 | { |
118 | - $this->arguments[$name] = $value; |
|
118 | + $this->arguments[ $name ] = $value; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * @param null|string $namespace |
150 | 150 | * @return string |
151 | 151 | */ |
152 | - protected function renderCommandName(string $command, ?string $namespace) |
|
152 | + protected function renderCommandName(string $command, ? string $namespace) |
|
153 | 153 | { |
154 | 154 | return $namespace === null |
155 | 155 | ? $command |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $this |
49 | 49 | ->getWriter(), |
50 | 50 | new Configurator(), |
51 | - [] |
|
51 | + [ ] |
|
52 | 52 | ); |
53 | 53 | $command->setContainer( |
54 | 54 | $this |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * @param string $command |
32 | 32 | * @param null|string $namespace |
33 | 33 | */ |
34 | - public function iSelectCommandInNamespace(string $command, ?string $namespace) |
|
34 | + public function iSelectCommandInNamespace(string $command, ? string $namespace) |
|
35 | 35 | { |
36 | 36 | $this->selectedCommand = $this->getApplication() |
37 | 37 | ->find( |
@@ -105,7 +105,7 @@ |
||
105 | 105 | $this->implementCommand = new ImplementCommand( |
106 | 106 | $this->getWriter(), |
107 | 107 | $this->getConfigurator(), |
108 | - [CommandConfig::NAME_KEY => self::COMMAND_NAME] |
|
108 | + [ CommandConfig::NAME_KEY => self::COMMAND_NAME ] |
|
109 | 109 | ); |
110 | 110 | $this->implementCommand->setContainer( |
111 | 111 | $this->createContainerProphecy()->reveal() |
@@ -40,7 +40,7 @@ |
||
40 | 40 | 'command' => 'behavior:implement', |
41 | 41 | 'interface' => $interface |
42 | 42 | ); |
43 | - if ($this->applicationTester->run($arguments, []) !== 0) { |
|
43 | + if ($this->applicationTester->run($arguments, [ ]) !== 0) { |
|
44 | 44 | throw new \Exception('Test runner exited with an error '); |
45 | 45 | } |
46 | 46 | } |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | */ |
97 | 97 | protected $interfaceName; |
98 | 98 | |
99 | - public function __construct(WriterInterface $writer, ConfiguratorInterface $configurator, $config = []) |
|
99 | + public function __construct(WriterInterface $writer, ConfiguratorInterface $configurator, $config = [ ]) |
|
100 | 100 | { |
101 | - $config['name'] = self::NAME; |
|
101 | + $config[ 'name' ] = self::NAME; |
|
102 | 102 | parent::__construct($writer, $configurator, $config); |
103 | 103 | } |
104 | 104 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | private function confirmInterfaceGeneration() |
126 | 126 | { |
127 | - if ((bool)$this->getInput()->getOption(self::FORCE_KEY)) { |
|
127 | + if ((bool) $this->getInput()->getOption(self::FORCE_KEY)) { |
|
128 | 128 | return true; |
129 | 129 | } |
130 | 130 |