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 | * @param string $name |
||
110 | * @return bool |
||
111 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
112 | */ |
||
113 | public function hasAttribute(string $class, string $name): bool |
||
117 | |||
118 | /** |
||
119 | * @param string $class |
||
120 | * @return iterable|string[] |
||
121 | */ |
||
122 | private function getClassInheritance(string $class): iterable |
||
137 | |||
138 | /** |
||
139 | * @param string $class |
||
140 | * @param string $name |
||
141 | * @param \Closure $build |
||
142 | * @return null|AttributeInterface |
||
143 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
144 | */ |
||
145 | private function getAttributeOrBuild(string $class, string $name, \Closure $build): ?AttributeInterface |
||
157 | |||
158 | /** |
||
159 | * @param string $class |
||
160 | * @param string $name |
||
161 | * @return string |
||
162 | */ |
||
163 | private function getCacheKey(string $class, string $name): string |
||
167 | } |
||
168 |
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.