1 | <?php |
||
13 | class AliasPathStackResolver extends FileResolverAbstract |
||
14 | { |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $aliases = []; |
||
19 | |||
20 | /** |
||
21 | * Flag indicating whether or not LFI protection for rendering view scripts is enabled |
||
22 | * |
||
23 | * @var bool |
||
24 | */ |
||
25 | protected $lfiProtectionOn = true; |
||
26 | |||
27 | /** |
||
28 | * Constructor |
||
29 | * |
||
30 | * Populate the array stack with a list of aliases and their corresponding paths |
||
31 | * |
||
32 | * @param array $aliases |
||
33 | * |
||
34 | * @throws Exception\InvalidArgumentException |
||
35 | */ |
||
36 | public function __construct(array $aliases) |
||
42 | |||
43 | /** |
||
44 | * Add a single alias to the stack |
||
45 | * |
||
46 | * @param string $alias |
||
47 | * @param string $path |
||
48 | * |
||
49 | * @throws Exception\InvalidArgumentException |
||
50 | */ |
||
51 | private function addAlias($alias, $path) |
||
69 | |||
70 | /** |
||
71 | * Normalize a path for insertion in the stack |
||
72 | * |
||
73 | * @param string $path |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | private function normalizePath($path) |
||
81 | |||
82 | /** |
||
83 | * Set LFI protection flag |
||
84 | * |
||
85 | * @param bool $flag |
||
86 | * @return void |
||
87 | */ |
||
88 | public function setLfiProtection($flag) |
||
92 | |||
93 | /** |
||
94 | * Return status of LFI protection flag |
||
95 | * |
||
96 | * @return bool |
||
97 | */ |
||
98 | public function isLfiProtectionOn() |
||
102 | |||
103 | /** |
||
104 | * {@inheritDoc} |
||
105 | */ |
||
106 | public function resolve($name) |
||
132 | |||
133 | /** |
||
134 | * {@inheritDoc} |
||
135 | */ |
||
136 | public function collect() |
||
164 | } |
||
165 |
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.