minor #20813 [Console] Review Application docblocks (ogizanagi)

This PR was squashed before being merged into the 2.7 branch (closes #20813).

Discussion
----------

[Console] Review Application docblocks

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

~I know there must be a lot of other places in the core where there is some repeated or useless informations in docblocks, but everytime I dig into the `Application` class, I see this, and I don't want to repeat things for consistency when adding new methods 😅  (for instance in #20808, the `setCatchThrowables / areThrowablesCaught ` methods do not need a docblock description IMHO).~

~This PR adapts docblocks where:~

- ~A docblock description is not required, as everything can be expressed in the `@return / @param` argument (the case mentioned above)~
- ~Information is redundant between description and tags, and the context does not have to be reminded again:~

```diff

    /**
     * Adds an array of command objects.
     *
     * If a Command is not enabled it will not be added.
     *
-     * @param Command[] $commands An array of commands
+     * @param Command[] $commands
     */
    public function addCommands(array $commands)
    {
        foreach ($commands as $command) {
            $this->add($command);
        }
    }
```

Commits
-------

d8c18cc [Console] Review Application docblocks
This commit is contained in:
Fabien Potencier 2016-12-13 16:27:53 +01:00
commit 7f85f6dc1e
1 changed files with 1 additions and 5 deletions

View File

@ -102,8 +102,6 @@ class Application
* @param OutputInterface $output An Output instance
*
* @return int 0 if everything went fine, or an error code
*
* @throws \Exception When doRun returns Exception
*/
public function run(InputInterface $input = null, OutputInterface $output = null)
{
@ -387,7 +385,7 @@ class Application
*
* @return Command A Command object
*
* @throws \InvalidArgumentException When command name given does not exist
* @throws \InvalidArgumentException When given command name does not exist
*/
public function get($name)
{
@ -831,8 +829,6 @@ class Application
* @param OutputInterface $output An Output instance
*
* @return int 0 if everything went fine, or an error code
*
* @throws \Exception when the command being run threw an exception
*/
protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
{