Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6639321

Browse filesBrowse files
committed
Fix code style
1 parent 332b4ef commit 6639321
Copy full SHA for 6639321

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

63 files changed

+707
-241
lines changed

‎src/Symfony/Component/Console/Completion/CompletionInput.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Completion/CompletionInput.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,15 @@ private function getOptionFromToken(string $optionToken): ?InputOption
201201
if ($this->definition->hasOption($optionName) && !$this->definition->getOption($optionName)->isHidden()) {
202202
return $this->definition->getOption($optionName);
203203
}
204+
204205
return null;
205206
}
206207

207208
// short option name
208209
if ($this->definition->hasShortcut($optionName[0]) && !$this->definition->getOptionForShortcut($optionName[0])->isHidden()) {
209210
return $this->definition->getOptionForShortcut($optionName[0]);
210211
}
212+
211213
return null;
212214
}
213215

‎src/Symfony/Component/Console/Descriptor/Descriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Descriptor/Descriptor.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ public function describe(OutputInterface $output, object $object, array $options
4444

4545
/**
4646
* Filter hidden options from list.
47+
*
4748
* @param array<string,InputOption> $inputOptions
49+
*
4850
* @return array<string,InputOption>
4951
*/
5052
protected function removeHiddenOptions(array $inputOptions, array $options = []): array
5153
{
52-
return array_filter($inputOptions, fn(InputOption $option) => !$this->skipHiddenOption($option, $options));
54+
return array_filter($inputOptions, fn (InputOption $option) => !$this->skipHiddenOption($option, $options));
5355
}
5456

5557
/**

‎src/Symfony/Component/Console/Descriptor/JsonDescriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Descriptor/JsonDescriptor.php
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,17 @@ private function getInputArgumentData(InputArgument $argument): array
105105
private function getInputOptionData(InputOption $option, bool $negated = false): array
106106
{
107107
$data = $negated ? [
108-
'name' => '--no-' . $option->getName(),
108+
'name' => '--no-'.$option->getName(),
109109
'shortcut' => '',
110110
'accept_value' => false,
111111
'is_value_required' => false,
112112
'is_multiple' => false,
113113
'is_deprecated' => $option->isDeprecated(),
114-
'description' => 'Negate the "--' . $option->getName() . '" option',
114+
'description' => 'Negate the "--'.$option->getName().'" option',
115115
'default' => false,
116116
] : [
117-
'name' => '--' . $option->getName(),
118-
'shortcut' => $option->getShortcut() ? '-' . str_replace('|', '|-', $option->getShortcut()) : '',
117+
'name' => '--'.$option->getName(),
118+
'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '',
119119
'accept_value' => $option->acceptValue(),
120120
'is_value_required' => $option->isValueRequired(),
121121
'is_multiple' => $option->isArray(),
@@ -126,6 +126,7 @@ private function getInputOptionData(InputOption $option, bool $negated = false):
126126
if (!$option->isDeprecated()) {
127127
unset($data['is_deprecated']);
128128
}
129+
129130
return $data;
130131
}
131132

‎src/Symfony/Component/Console/Descriptor/ReStructuredTextDescriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Descriptor/ReStructuredTextDescriptor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected function describeInputDefinition(InputDefinition $definition, array $o
106106
$this->write("\n\n");
107107
}
108108

109-
$this->write("Options\n" . str_repeat($this->subsubsectionChar, 7) . "\n\n");
109+
$this->write("Options\n".str_repeat($this->subsubsectionChar, 7)."\n\n");
110110
foreach ($inputOptions as $option) {
111111
$this->describeInputOption($option, $options);
112112
$this->write("\n");

‎src/Symfony/Component/Console/Helper/ProgressIndicator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/ProgressIndicator.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public function __construct(
5454
private int $indicatorChangeInterval = 100,
5555
?array $indicatorValues = null,
5656
) {
57-
5857
$format ??= $this->determineBestFormat();
5958
$indicatorValues ??= ['-', '\\', '|', '/'];
6059
$indicatorValues = array_values($indicatorValues);

‎src/Symfony/Component/Console/Helper/QuestionHelper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/QuestionHelper.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function ask(InputInterface $input, OutputInterface $output, Question $qu
5555
}
5656

5757
$inputStream = $input instanceof StreamableInputInterface ? $input->getStream() : null;
58-
$inputStream ??= STDIN;
58+
$inputStream ??= \STDIN;
5959

6060
try {
6161
if (!$question->getValidator()) {

‎src/Symfony/Component/Console/Input/InputOption.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Input/InputOption.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function isArray(): bool
196196
*
197197
* @return bool true if mode is self::DEPRECATED, false otherwise
198198
*/
199-
public function isDeprecated():bool
199+
public function isDeprecated(): bool
200200
{
201201
return $this->hastMode(self::DEPRECATED);
202202
}
@@ -206,7 +206,7 @@ public function isDeprecated():bool
206206
*
207207
* @return bool true if mode is self::HIDDEN, false otherwise
208208
*/
209-
public function isHidden():bool
209+
public function isHidden(): bool
210210
{
211211
return $this->hastMode(self::HIDDEN);
212212
}

‎src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTestCase.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTestCase.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testDescribeCommandWithHiddenOptions()
5050
{
5151
[$command, $expectedDescription] = static::getDescriptionTestData(['command_5_with_hidden_options' => new DescriptorCommand5()])[0];
5252

53-
$this->assertDescription($expectedDescription, $command, ['show-hidden-options' =>true]);
53+
$this->assertDescription($expectedDescription, $command, ['show-hidden-options' => true]);
5454
}
5555

5656
/** @dataProvider getDescribeApplicationTestData */

‎src/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ protected static function getFormat()
2727

2828
protected function normalizeOutput($output)
2929
{
30-
if (null === $output || !is_array($output = json_decode($output, true))) {
30+
if (null === $output || !\is_array($output = json_decode($output, true))) {
3131
return $output;
3232
}
33+
3334
return array_map($this->normalizeOutputRecursively(...), $output);
3435
}
3536

‎src/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413

514
class BarBucCommand extends Command

‎src/Symfony/Component/Console/Tests/Fixtures/BarHiddenCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/BarHiddenCommand.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Input\InputInterface;
514
use Symfony\Component\Console\Output\OutputInterface;

‎src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand5.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand5.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/*
44
* This file is part of the Symfony package.
55
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
68
* For the full copyright and license information, please view the LICENSE
79
* file that was distributed with this source code.
810
*/

‎src/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Input\InputInterface;
514
use Symfony\Component\Console\Output\OutputInterface;

‎src/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Input\InputInterface;
514
use Symfony\Component\Console\Output\OutputInterface;

‎src/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php
+14-5Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Input\InputInterface;
514
use Symfony\Component\Console\Output\OutputInterface;
@@ -18,12 +27,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
1827
{
1928
try {
2029
try {
21-
throw new \Exception('First exception <p>this is html</p>');
22-
} catch (\Exception $e) {
23-
throw new \Exception('Second exception <comment>comment</comment>', 0, $e);
30+
throw new Exception('First exception <p>this is html</p>');
31+
} catch (Exception $e) {
32+
throw new Exception('Second exception <comment>comment</comment>', 0, $e);
2433
}
25-
} catch (\Exception $e) {
26-
throw new \Exception('Third exception <fg=blue;bg=red>comment</>', 404, $e);
34+
} catch (Exception $e) {
35+
throw new Exception('Third exception <fg=blue;bg=red>comment</>', 404, $e);
2736
}
2837

2938
return 0;

‎src/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413

514
class Foo4Command extends Command

‎src/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413

514
class Foo5Command extends Command

‎src/Symfony/Component/Console/Tests/Fixtures/Foo6Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/Foo6Command.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413

514
class Foo6Command extends Command

‎src/Symfony/Component/Console/Tests/Fixtures/FooCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/FooCommand.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Input\InputInterface;
514
use Symfony\Component\Console\Output\OutputInterface;

‎src/Symfony/Component/Console/Tests/Fixtures/FooHiddenCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/FooHiddenCommand.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Input\InputInterface;
514
use Symfony\Component\Console\Output\OutputInterface;

‎src/Symfony/Component/Console/Tests/Fixtures/FooLock2Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/FooLock2Command.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Command\LockableTrait;
514
use Symfony\Component\Console\Input\InputInterface;

‎src/Symfony/Component/Console/Tests/Fixtures/FooLock3Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/FooLock3Command.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Command\LockableTrait;
514
use Symfony\Component\Console\Input\InputInterface;

‎src/Symfony/Component/Console/Tests/Fixtures/FooLockCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/FooLockCommand.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Command\LockableTrait;
514
use Symfony\Component\Console\Input\InputInterface;

‎src/Symfony/Component/Console/Tests/Fixtures/FooOptCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/FooOptCommand.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413
use Symfony\Component\Console\Input\InputInterface;
514
use Symfony\Component\Console\Input\InputOption;

‎src/Symfony/Component/Console/Tests/Fixtures/FooSameCaseLowercaseCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/FooSameCaseLowercaseCommand.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413

514
class FooSameCaseLowercaseCommand extends Command

‎src/Symfony/Component/Console/Tests/Fixtures/FooSameCaseUppercaseCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/FooSameCaseUppercaseCommand.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Console\Command\Command;
413

514
class FooSameCaseUppercaseCommand extends Command

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.