Completed
Push — master ( 8a0d56...8adc32 )
by Boy
04:00
created
lib/Executable.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -49,6 +49,7 @@
 block discarded – undo
49 49
 
50 50
     /**
51 51
      * @TODO Remove this extra indirection when 5.3 support is dropped
52
+     * @param \ReflectionFunctionAbstract $reflection
52 53
      */
53 54
     private function invokeClosureCompat($reflection, $args)
54 55
     {
Please login to merge, or discard this patch.
lib/Injector.php 2 patches
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -171,6 +171,9 @@  discard block
 block discarded – undo
171 171
         return $this;
172 172
     }
173 173
 
174
+    /**
175
+     * @param string $nameOrInstance
176
+     */
174 177
     private function shareClass($nameOrInstance)
175 178
     {
176 179
         list(, $normalizedName) = $this->resolveAlias($nameOrInstance);
@@ -319,6 +322,9 @@  discard block
 block discarded – undo
319 322
         return $result;
320 323
     }
321 324
 
325
+    /**
326
+     * @param string|null $name
327
+     */
322 328
     private function filter($source, $name)
323 329
     {
324 330
         if (empty($name)) {
@@ -384,6 +390,9 @@  discard block
 block discarded – undo
384 390
         return $obj;
385 391
     }
386 392
 
393
+    /**
394
+     * @param string $normalizedClass
395
+     */
387 396
     private function provisionInstance($className, $normalizedClass, array $definition)
388 397
     {
389 398
         try {
@@ -631,6 +640,9 @@  discard block
 block discarded – undo
631 640
         return $arg;
632 641
     }
633 642
 
643
+    /**
644
+     * @param string $normalizedClass
645
+     */
634 646
     private function prepareInstance($obj, $normalizedClass)
635 647
     {
636 648
         if (isset($this->prepares[$normalizedClass])) {
@@ -737,6 +749,9 @@  discard block
 block discarded – undo
737 749
         return $executableStruct;
738 750
     }
739 751
 
752
+    /**
753
+     * @param string $stringExecutable
754
+     */
740 755
     private function buildExecutableStructFromString($stringExecutable)
741 756
     {
742 757
         if (function_exists($stringExecutable)) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -477,13 +477,13 @@  discard block
 block discarded – undo
477 477
             } elseif (isset($definitions[$name]) || array_key_exists($name, $definitions)) {
478 478
                 // interpret the param as a class name to be instantiated
479 479
                 $arg = $this->make($definitions[$name]);
480
-            } elseif (($prefix = self::A_RAW . $name) && (isset($definitions[$prefix]) || array_key_exists($prefix, $definitions))) {
480
+            } elseif (($prefix = self::A_RAW.$name) && (isset($definitions[$prefix]) || array_key_exists($prefix, $definitions))) {
481 481
                 // interpret the param as a raw value to be injected
482 482
                 $arg = $definitions[$prefix];
483
-            } elseif (($prefix = self::A_DELEGATE . $name) && isset($definitions[$prefix])) {
483
+            } elseif (($prefix = self::A_DELEGATE.$name) && isset($definitions[$prefix])) {
484 484
                 // interpret the param as an invokable delegate
485 485
                 $arg = $this->buildArgFromDelegate($name, $definitions[$prefix]);
486
-            } elseif (($prefix = self::A_DEFINE . $name) && isset($definitions[$prefix])) {
486
+            } elseif (($prefix = self::A_DEFINE.$name) && isset($definitions[$prefix])) {
487 487
                 // interpret the param as a class definition
488 488
                 $arg = $this->buildArgFromParamDefineArr($definitions[$prefix]);
489 489
             } elseif (!$arg = $this->buildArgFromTypeHint($reflFunc, $reflParam)) {
@@ -568,9 +568,9 @@  discard block
 block discarded – undo
568 568
         } else {
569 569
             $reflFunc = $reflParam->getDeclaringFunction();
570 570
             $classWord = ($reflFunc instanceof \ReflectionMethod)
571
-                ? $reflFunc->getDeclaringClass()->name . '::'
571
+                ? $reflFunc->getDeclaringClass()->name.'::'
572 572
                 : '';
573
-            $funcWord = $classWord . $reflFunc->name;
573
+            $funcWord = $classWord.$reflFunc->name;
574 574
 
575 575
             throw new InjectionException(
576 576
                 $this->inProgressMakes,
Please login to merge, or discard this patch.
lib/CachingReflector.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -199,6 +199,9 @@
 block discarded – undo
199 199
         return $docBlock;
200 200
     }
201 201
 
202
+    /**
203
+     * @param string $className
204
+     */
202 205
     public function getImplemented($className)
203 206
     {
204 207
         $cacheKey = self::CACHE_KEY_IMPLEMENTED . strtolower($className);
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function getClass($class)
28 28
     {
29
-        $cacheKey = self::CACHE_KEY_CLASSES . strtolower($class);
29
+        $cacheKey = self::CACHE_KEY_CLASSES.strtolower($class);
30 30
 
31 31
         if (!$reflectionClass = $this->cache->fetch($cacheKey)) {
32 32
             $reflectionClass = new ExtendedReflectionClass($class);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
     public function getCtor($class)
40 40
     {
41
-        $cacheKey = self::CACHE_KEY_CTORS . strtolower($class);
41
+        $cacheKey = self::CACHE_KEY_CTORS.strtolower($class);
42 42
 
43 43
         $reflectedCtor = $this->cache->fetch($cacheKey);
44 44
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function getCtorParams($class)
55 55
     {
56
-        $cacheKey = self::CACHE_KEY_CTOR_PARAMS . strtolower($class);
56
+        $cacheKey = self::CACHE_KEY_CTOR_PARAMS.strtolower($class);
57 57
 
58 58
         $reflectedCtorParams = $this->cache->fetch($cacheKey);
59 59
 
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
         if ($function instanceof \ReflectionMethod) {
78 78
             $lowClass = strtolower($function->class);
79 79
             $lowMethod = strtolower($function->name);
80
-            $paramCacheKey = self::CACHE_KEY_CLASSES . "{$lowClass}.{$lowMethod}.param-{$lowParam}";
80
+            $paramCacheKey = self::CACHE_KEY_CLASSES."{$lowClass}.{$lowMethod}.param-{$lowParam}";
81 81
         } else {
82 82
             $lowFunc = strtolower($function->name);
83 83
             $paramCacheKey = ($lowFunc !== '{closure}')
84
-                ? self::CACHE_KEY_FUNCS . ".{$lowFunc}.param-{$lowParam}"
84
+                ? self::CACHE_KEY_FUNCS.".{$lowFunc}.param-{$lowParam}"
85 85
                 : null;
86 86
         }
87 87
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         if ($reflectionClass = $param->getClass()) {
95 95
             $typeHint = $reflectionClass->getName();
96
-            $classCacheKey = self::CACHE_KEY_CLASSES . strtolower($typeHint);
96
+            $classCacheKey = self::CACHE_KEY_CLASSES.strtolower($typeHint);
97 97
             $this->cache->store($classCacheKey, $this->getClass($param->getClass()->getName()));
98 98
         } elseif (($docBlockParams = $this->getDocBlock($function)->getTagsByName('param')) && !empty($docBlockParams)) {
99 99
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
                         // use first definition, there is no way to know which instance of the hinted doc block definitions is actually required
129 129
                         // because there were either no arguments given or no argument match was found
130
-                        list($typeHint, ) = $definitions;
130
+                        list($typeHint,) = $definitions;
131 131
                     }
132 132
                 }
133 133
             }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             // store the ExtendedReflectionClass in the cache
136 136
             if ($typeHint !== false) {
137 137
 
138
-                $classCacheKey = self::CACHE_KEY_CLASSES . strtolower($typeHint);
138
+                $classCacheKey = self::CACHE_KEY_CLASSES.strtolower($typeHint);
139 139
                 $this->cache->store($classCacheKey, $this->getClass($typeHint));
140 140
             }
141 141
         } else {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     public function getFunction($functionName)
151 151
     {
152 152
         $lowFunc = strtolower($functionName);
153
-        $cacheKey = self::CACHE_KEY_FUNCS . $lowFunc;
153
+        $cacheKey = self::CACHE_KEY_FUNCS.$lowFunc;
154 154
 
155 155
         $reflectedFunc = $this->cache->fetch($cacheKey);
156 156
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             ? $classNameOrInstance
169 169
             : get_class($classNameOrInstance);
170 170
 
171
-        $cacheKey = self::CACHE_KEY_METHODS . strtolower($className) . '.' . strtolower($methodName);
171
+        $cacheKey = self::CACHE_KEY_METHODS.strtolower($className).'.'.strtolower($methodName);
172 172
 
173 173
         if (!$reflectedMethod = $this->cache->fetch($cacheKey)) {
174 174
             $reflectedMethod = new \ReflectionMethod($className, $methodName);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
     public function getDocBlock(\ReflectionFunctionAbstract $method)
182 182
     {
183
-        $cacheKey = self::CACHE_KEY_DOC_BLOCK . strtolower($method->class);
183
+        $cacheKey = self::CACHE_KEY_DOC_BLOCK.strtolower($method->class);
184 184
         if (!$docBlock = $this->cache->fetch($cacheKey)) {
185 185
 
186 186
             $class = $this->getClass($method->class);
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
     public function getImplemented($className)
203 203
     {
204
-        $cacheKey = self::CACHE_KEY_IMPLEMENTED . strtolower($className);
204
+        $cacheKey = self::CACHE_KEY_IMPLEMENTED.strtolower($className);
205 205
 
206 206
         if (!$implemented = $this->cache->fetch($cacheKey)) {
207 207
             $implemented = array_merge([$className], class_implements($className));
Please login to merge, or discard this patch.
lib/StandardReflector.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -100,6 +100,9 @@
 block discarded – undo
100 100
         );
101 101
     }
102 102
 
103
+    /**
104
+     * @param string $className
105
+     */
103 106
     public function getImplemented($className)
104 107
     {
105 108
         return array_merge([$className], class_implements($className));
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
                         // use first definition, there is no way to know which instance of the hinted doc block definitions is actually required
64 64
                         // because there were either no arguments given or no argument match was found
65
-                        list($typeHint, ) = $definitions;
65
+                        list($typeHint,) = $definitions;
66 66
                     }
67 67
                 }
68 68
             }
Please login to merge, or discard this patch.