Completed
Pull Request — master (#16)
by Greg
02:24
created
src/CommandInfo.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -254,8 +254,8 @@
 block discarded – undo
254 254
 
255 255
     protected function convertName($camel)
256 256
     {
257
-        $splitter="-";
258
-        $camel=preg_replace('/(?!^)[[:upper:]][[:lower:]]/', '$0', preg_replace('/(?!^)[[:upper:]]+/', $splitter.'$0', $camel));
257
+        $splitter = "-";
258
+        $camel = preg_replace('/(?!^)[[:upper:]][[:lower:]]/', '$0', preg_replace('/(?!^)[[:upper:]]+/', $splitter.'$0', $camel));
259 259
         $camel = preg_replace("/$splitter/", ':', $camel, 1);
260 260
         return strtolower($camel);
261 261
     }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     /**
20 20
      * @var boolean
21 21
      * @var string
22
-    */
22
+     */
23 23
     protected $docBlockIsParsed;
24 24
 
25 25
     /**
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /**
96 96
      * Return the list of refleaction parameters.
97 97
      *
98
-     * @return ReflectionParameter[]
98
+     * @return \ReflectionParameter[]
99 99
      */
100 100
     public function getParameters()
101 101
     {
@@ -497,6 +497,7 @@  discard block
 block discarded – undo
497 497
      * instance, we will allow the @option or @default tag to
498 498
      * reference the option only by name (e.g. 'silent' or 's'
499 499
      * instead of 'silent|s').
500
+     * @return string
500 501
      */
501 502
     public function findMatchingOption($optionName)
502 503
     {
@@ -529,6 +530,8 @@  discard block
 block discarded – undo
529 530
     /**
530 531
      * Given a list that might be 'a b c' or 'a, b, c' or 'a,b,c',
531 532
      * convert the data into the last of these forms.
533
+     * @param string $text
534
+     * @return string
532 535
      */
533 536
     protected static function convertListToCommaSeparated($text)
534 537
     {
Please login to merge, or discard this patch.
src/CommandFileDiscovery.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         return $this->joinParts(
268 268
             '\\',
269 269
             $namespaceParts,
270
-            function ($item) {
270
+            function($item) {
271 271
                 return !is_numeric($item) && !empty($item);
272 272
             }
273 273
         );
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
         return $this->joinParts(
287 287
             '/',
288 288
             $pathParts,
289
-            function ($item) {
289
+            function($item) {
290 290
                 return !empty($item);
291 291
             }
292 292
         );
Please login to merge, or discard this patch.
src/AnnotatedCommandFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         // set or setup.
68 68
         $commandMethodNames = array_filter(
69 69
             get_class_methods($classNameOrInstance) ?: [],
70
-            function ($m) {
70
+            function($m) {
71 71
                 return !preg_match('#^(_|get[A-Z]|set[A-Z])#', $m);
72 72
             }
73 73
         );
Please login to merge, or discard this patch.
src/DefaultsWithDescriptions.php 1 patch
Doc Comments   +8 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,9 @@  discard block
 block discarded – undo
24 24
      */
25 25
     protected $defaultDefault;
26 26
 
27
+    /**
28
+     * @param boolean $defaultDefault
29
+     */
27 30
     public function __construct($values, $defaultDefault = null)
28 31
     {
29 32
         $this->values = $values;
@@ -45,13 +48,17 @@  discard block
 block discarded – undo
45 48
      * Check to see whether the speicifed key exists in the collection.
46 49
      *
47 50
      * @param type $key
48
-     * @return type
51
+     * @return boolean
49 52
      */
50 53
     public function exists($key)
51 54
     {
52 55
         return array_key_exists($key, $this->values);
53 56
     }
54 57
 
58
+    /**
59
+     * @param string $key
60
+     * @param string $defaultValue
61
+     */
55 62
     public function setDefaultValue($key, $defaultValue)
56 63
     {
57 64
         $this->values[$key] = $defaultValue;
Please login to merge, or discard this patch.