Completed
Push — master ( 42a15b...d491ac )
by Paweł
02:03
created
src/CommandReflection.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     public $commandClass;
11 11
 
12 12
     /**
13
-     * @param $commandName
13
+     * @param string $commandName
14 14
      * @param $commandClass
15 15
      */
16 16
     public function __construct($commandName, $commandClass)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@  discard block
 block discarded – undo
39 39
         $commandReflection = new \ReflectionClass($this->commandClass);
40 40
 
41 41
         return $commandParameters = $commandReflection->getConstructor() ?
42
-            $commandReflection->getConstructor()->getParameters() :
43
-            [];
42
+            $commandReflection->getConstructor()->getParameters() : [];
44 43
     }
45 44
 
46 45
     /**
@@ -58,14 +57,14 @@  discard block
 block discarded – undo
58 57
 
59 58
         $inputArguments = $argumentsProcessor->process($arguments);
60 59
 
61
-        $arrayDivide = function (array $array, callable $predicate) {
60
+        $arrayDivide = function(array $array, callable $predicate) {
62 61
             return [
63
-                array_filter($array, function ($value, $key) use ($predicate) { return $predicate($key, $value); }, ARRAY_FILTER_USE_BOTH),
64
-                array_filter($array, function ($value, $key) use ($predicate) { return !$predicate($key, $value); }, ARRAY_FILTER_USE_BOTH),
62
+                array_filter($array, function($value, $key) use ($predicate) { return $predicate($key, $value); }, ARRAY_FILTER_USE_BOTH),
63
+                array_filter($array, function($value, $key) use ($predicate) { return !$predicate($key, $value); }, ARRAY_FILTER_USE_BOTH),
65 64
             ];
66 65
         };
67 66
 
68
-        $isKeyInteger = function ($key) {
67
+        $isKeyInteger = function($key) {
69 68
             return is_integer($key);
70 69
         };
71 70
 
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
 
76 75
         foreach ($this->parameters() as $commandArgument) {
77 76
             $argument = array_key_exists($commandArgument->getName(), $namedArguments) ?
78
-                $namedArguments[$commandArgument->getName()] :
79
-                array_shift($orderedArguments);
77
+                $namedArguments[$commandArgument->getName()] : array_shift($orderedArguments);
80 78
 
81 79
             if (null === $argument) {
82 80
                 throw new MissingCommandArgument(
Please login to merge, or discard this patch.