8000 Merge branch '2.7' into 2.8 · symfony/console@16651a6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 16651a6

Browse files
Merge branch '2.7' into 2.8
* 2.7: [Console] Application update PHPDoc of add and register methods [Config] Extra tests for Config component Fixed bugs in names of classes and methods. [DoctrineBridge] Fixed php doc [FrameworkBundle] Fixed parameters number mismatch declaration [BrowserKit] Added test for followRedirect method (POST method) Fix the money form type render with Bootstrap3 [BrowserKit] Uppercase the "GET" method in redirects [WebProfilerBundle] Fixed JSDoc parameter definition [HttpFoundation] HttpCache refresh stale responses containing an ETag Conflicts: src/Symfony/Component/BrowserKit/Tests/ClientTest.php src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php
2 parents cec9c5d + a951818 commit 16651a6

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

Application.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function getHelperSet()
216216
}
217217

218218
/**
219-
* Set an input definition set to be used with this application.
219+
* Set an input definition to be used with this application.
220220
*
221221
* @param InputDefinition $definition The input definition
222222
*/
@@ -338,6 +338,8 @@ public function register($name)
338338
/**
339339
* Adds an array of command objects.
340340
*
341+
* If a Command is not enabled it will not be added.
342+
*
341343
* @param Command[] $commands An array of commands
342344
*/
343345
public function addCommands(array $commands)
@@ -351,10 +353,11 @@ public function addCommands(array $commands)
351353
* Adds a command object.
352354
*
353355
* If a command with the same name already exists, it will be overridden.
356+
* If the command is not enabled it will not be added.
354357
*
355358
* @param Command $command A Command object
356359
*
357-
* @return Command The registered command
360+
* @return Command|null The registered command if enabled or null
358361
*/
359362
public function add(Command $command)
360363
{
@@ -423,9 +426,9 @@ public function has($name)
423426
/**
424427
* Returns an array of all unique namespaces used by currently registered commands.
425428
*
426-
* It does not returns the global namespace which always exists.
429+
* It does not return the global namespace which always exists.
427430
*
428-
* @return array An array of namespaces
431+
* @return string[] An array of namespaces
429432
*/
430433
public function getNamespaces()
431434
{
@@ -965,7 +968,7 @@ private function getSttyColumns()
965968
/**
966969
* Runs and parses mode CON if it's available, suppressing any error output.
967970
*
968-
* @return string <width>x<height> or null if it could not be parsed
971+
* @return string|null <width>x<height> or null if it could not be parsed
969972
*/
970973
private function getConsoleMode()
971974
{
@@ -1024,7 +1027,7 @@ public function extractNamespace($name, $limit = null)
10241027
* @param string $name The string
10251028
* @param array|\Traversable $collection The collection
10261029
*
1027-
* @return array A sorted array of similar string
1030+
* @return string[] A sorted array of similar string
10281031
*/
10291032
private function findAlternatives($name, $collection)
10301033
{
@@ -1123,7 +1126,7 @@ private function splitStringByWidth($string, $width)
11231126
*
11241127
* @param string $name The full name of the command
11251128
*
1126-
* @return array The namespaces of the command
1129+
* @return string[] The namespaces of the command
11271130
*/
11281131
private function extractAllNamespaces($name)
11291132
{

Helper/SymfonyQuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function writePrompt(OutputInterface $output, Question $question)
6767

6868
break;
6969

70-
case $question instanceof ChoiceQuestion && $question->isMultiSelect():
70+
case $question instanceof ChoiceQuestion && $question->isMultiselect():
7171
$choices = $question->getChoices();
7272
$default = explode(',', $default);
7373

Tests/ApplicationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public function testFindAlternativeNamespace()
425425
$application->add(new \FooCommand());
426426
$application->add(new \Foo1Command());
427427
$application->add(new \Foo2Command());
428-
$application->add(new \foo3Command());
428+
$application->add(new \Foo3Command());
429429

430430
try {
431431
$application->find('Unknown-namespace:Unknown-command');

0 commit comments

Comments
 (0)
0