Completed
Pull Request — master (#98)
by Greg
02:12
created
src/Parser/Internal/CommandDocBlockParser2.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 use phpDocumentor\Reflection\DocBlock;
5 5
 use phpDocumentor\Reflection\DocBlock\Tag\ParamTag;
6 6
 use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag;
7
-use Consolidation\AnnotatedCommand\Parser\CommandInfo;
8
-use Consolidation\AnnotatedCommand\Parser\DefaultsWithDescriptions;
9 7
 
10 8
 /**
11 9
  * Given a class and method name, parse the annotations in the
Please login to merge, or discard this patch.
src/Parser/Internal/AbstractCommandDocBlockParser.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -207,6 +207,7 @@  discard block
 block discarded – undo
207 207
     /**
208 208
      * Given a docblock description in the form "$variable description",
209 209
      * return the variable name and description via the 'match' parameter.
210
+     * @param string $source
210 211
      */
211 212
     protected function pregMatchNameAndDescription($source, &$match)
212 213
     {
@@ -220,6 +221,7 @@  discard block
 block discarded – undo
220 221
     /**
221 222
      * Given a docblock description in the form "$variable description",
222 223
      * return the variable name and description via the 'match' parameter.
224
+     * @param string $source
223 225
      */
224 226
     protected function pregMatchOptionNameAndDescription($source, &$match)
225 227
     {
Please login to merge, or discard this patch.
src/CommandData.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     /**
38 38
      * For internal use only; indicates that the function to be called
39 39
      * should be passed an InputInterface &/or an OutputInterface.
40
-     * @param booean $usesInputInterface
40
+     * @param boolean $usesInputInterface
41 41
      * @param boolean $usesOutputInterface
42 42
      * @return self
43 43
      */
Please login to merge, or discard this patch.
src/AnnotatedCommand.php 2 patches
Doc Comments   +19 added lines patch added patch discarded remove patch
@@ -38,6 +38,9 @@  discard block
 block discarded – undo
38 38
     protected $usesOutputInterface;
39 39
     protected $returnType;
40 40
 
41
+    /**
42
+     * @param string $name
43
+     */
41 44
     public function __construct($name = null)
42 45
     {
43 46
         $commandInfo = false;
@@ -67,6 +70,9 @@  discard block
 block discarded – undo
67 70
         return $this;
68 71
     }
69 72
 
73
+    /**
74
+     * @param CommandProcessor $commandProcessor
75
+     */
70 76
     public function setCommandProcessor($commandProcessor)
71 77
     {
72 78
         $this->commandProcessor = $commandProcessor;
@@ -120,6 +126,9 @@  discard block
 block discarded – undo
120 126
         return $this;
121 127
     }
122 128
 
129
+    /**
130
+     * @param CommandInfo $commandInfo
131
+     */
123 132
     public function setCommandInfo($commandInfo)
124 133
     {
125 134
         $this->setDescription($commandInfo->getDescription());
@@ -198,6 +207,10 @@  discard block
 block discarded – undo
198 207
         return $dom;
199 208
     }
200 209
 
210
+    /**
211
+     * @param \DOMDocument $dom
212
+     * @param string $tagName
213
+     */
201 214
     protected function getSingleElementByTagName($dom, $parent, $tagName)
202 215
     {
203 216
         // There should always be exactly one '<command>' element.
@@ -275,6 +288,9 @@  discard block
 block discarded – undo
275 288
         return InputArgument::OPTIONAL;
276 289
     }
277 290
 
291
+    /**
292
+     * @param CommandInfo $commandInfo
293
+     */
278 294
     public function setCommandOptions($commandInfo, $automaticOptions = [])
279 295
     {
280 296
         $inputOptions = $commandInfo->inputOptions();
@@ -345,6 +361,9 @@  discard block
 block discarded – undo
345 361
         );
346 362
     }
347 363
 
364
+    /**
365
+     * @param Hooks\CommandInfo[] $commandInfoList
366
+     */
348 367
     public function optionsHookForHookAnnotations($commandInfoList)
349 368
     {
350 369
         foreach ($commandInfoList as $commandInfo) {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Consolidation\AnnotatedCommand\Hooks\HookManager;
5 5
 use Consolidation\AnnotatedCommand\Parser\CommandInfo;
6
-use Consolidation\OutputFormatters\FormatterManager;
7
-use Consolidation\OutputFormatters\Options\FormatterOptions;
8 6
 use Consolidation\AnnotatedCommand\Help\HelpDocumentAlter;
9 7
 use Symfony\Component\Console\Command\Command;
10 8
 use Symfony\Component\Console\Input\InputArgument;
Please login to merge, or discard this patch.
src/Parser/CommandInfo.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 namespace Consolidation\AnnotatedCommand\Parser;
3 3
 
4 4
 use Symfony\Component\Console\Input\InputOption;
5
-use Consolidation\AnnotatedCommand\Parser\Internal\CommandDocBlockParser;
6 5
 use Consolidation\AnnotatedCommand\Parser\Internal\CommandDocBlockParserFactory;
7 6
 use Consolidation\AnnotatedCommand\AnnotationData;
8 7
 
Please login to merge, or discard this patch.
Doc Comments   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,6 +133,9 @@  discard block
 block discarded – undo
133 133
         return filemtime($path) != $cache['mtime'];
134 134
     }
135 135
 
136
+    /**
137
+     * @param string $methodName
138
+     */
136 139
     protected function constructFromClassAndMethod($classNameOrInstance, $methodName)
137 140
     {
138 141
         $this->otherAnnotations = new AnnotationData();
@@ -260,7 +263,6 @@  discard block
 block discarded – undo
260 263
     /**
261 264
      * Return a specific named annotation for this command as a list.
262 265
      *
263
-     * @param string $name The name of the annotation.
264 266
      * @return array|null
265 267
      */
266 268
     public function getAnnotationList($annotation)
@@ -439,7 +441,7 @@  discard block
 block discarded – undo
439 441
     /**
440 442
      * Return the list of refleaction parameters.
441 443
      *
442
-     * @return ReflectionParameter[]
444
+     * @return \ReflectionParameter[]
443 445
      */
444 446
     public function getParameters()
445 447
     {
@@ -579,7 +581,7 @@  discard block
 block discarded – undo
579 581
      * Examine the parameters of the method for this command, and
580 582
      * build a list of commandline arguements for them.
581 583
      *
582
-     * @return array
584
+     * @return DefaultsWithDescriptions
583 585
      */
584 586
     protected function determineAgumentClassifications()
585 587
     {
@@ -599,6 +601,7 @@  discard block
 block discarded – undo
599 601
      * Examine the provided parameter, and determine whether it
600 602
      * is a parameter that will be filled in with a positional
601 603
      * commandline argument.
604
+     * @param DefaultsWithDescriptions $result
602 605
      */
603 606
     protected function addParameterToResult($result, $param)
604 607
     {
@@ -689,6 +692,8 @@  discard block
 block discarded – undo
689 692
     /**
690 693
      * Given a list that might be 'a b c' or 'a, b, c' or 'a,b,c',
691 694
      * convert the data into the last of these forms.
695
+     * @param string $text
696
+     * @return string
692 697
      */
693 698
     protected static function convertListToCommaSeparated($text)
694 699
     {
Please login to merge, or discard this patch.