1 | <?php |
||
18 | final class Bootstrap |
||
19 | { |
||
20 | /** |
||
21 | * @var Bootstrap |
||
22 | */ |
||
23 | private static $instance; |
||
24 | |||
25 | /** |
||
26 | * @var CacheInterface |
||
27 | */ |
||
28 | private $cache; |
||
29 | |||
30 | /** |
||
31 | * @var Builder |
||
32 | */ |
||
33 | private $builder; |
||
34 | |||
35 | /** |
||
36 | * @var array|string[] |
||
37 | */ |
||
38 | private $inheritance = []; |
||
39 | |||
40 | /** |
||
41 | * @return Bootstrap |
||
42 | */ |
||
43 | public static function getInstance(): self |
||
47 | |||
48 | /** |
||
49 | * @param self|Bootstrap $instance |
||
50 | * @return Bootstrap |
||
51 | */ |
||
52 | public static function setInstance(?self $instance): self |
||
56 | |||
57 | /** |
||
58 | * Bootstrap constructor. |
||
59 | */ |
||
60 | private function __construct() |
||
65 | |||
66 | /** |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getInvocationPosition(): array |
||
75 | |||
76 | /** |
||
77 | * @param null|CacheInterface $cache |
||
78 | */ |
||
79 | public function setCacheDriver(?CacheInterface $cache): void |
||
83 | |||
84 | /** |
||
85 | * @param string $class |
||
86 | * @param string $name |
||
87 | * @return AttributeInterface|null |
||
88 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
89 | */ |
||
90 | public function getAttribute(string $class, string $name): ?AttributeInterface |
||
106 | |||
107 | /** |
||
108 | * @param string $class |
||
109 | * @return iterable|string[] |
||
110 | */ |
||
111 | private function getClassInheritance(string $class): iterable |
||
126 | |||
127 | /** |
||
128 | * @param string $class |
||
129 | * @param string $name |
||
130 | * @param \Closure $build |
||
131 | * @return null|AttributeInterface |
||
132 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
133 | */ |
||
134 | private function getAttributeOrBuild(string $class, string $name, \Closure $build): ?AttributeInterface |
||
146 | |||
147 | /** |
||
148 | * @param string $class |
||
149 | * @param string $name |
||
150 | * @return string |
||
151 | */ |
||
152 | private function getCacheKey(string $class, string $name): string |
||
156 | } |
||
157 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.