8000 minor #20813 [Console] Review Application docblocks (ogizanagi) · symfony/symfony@7f85f6d · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f85f6d

Browse files
committed
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
2 parents f22a505 + d8c18cc commit 7f85f6d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ public function setDispatcher(EventDispatcherInterface $dispatcher)
102102
* @param OutputInterface $output An Output instance
103103
*
104104
* @return int 0 if everything went fine, or an error code
105-
*
106-
* @throws \Exception When doRun returns Exception
107105
*/
108106
public function run(InputInterface $input = null, OutputInterface $output = null)
109107
{
@@ -387,7 +385,7 @@ public function add(Command $command)
387385
*
388386
* @return Command A Command object
389387
*
390-
* @throws \InvalidArgumentException When command name given does not exist
388+
* @throws \InvalidArgumentException When given command name does not exist
391389
*/
392390
public function get($name)
393391
{
@@ -831,8 +829,6 @@ protected function configureIO(InputInterface $input, OutputInterface $output)
831829
* @param OutputInterface $output An Output instance
832830
*
833831
* @return int 0 if everything went fine, or an error code
834-
*
835-
* @throws \Exception when the command being run threw an exception
836832
*/
837833
protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
838834
{

0 commit comments

Comments
 (0)
0