Conditions | 5 |
Paths | 5 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
4 | function context() { |
||
5 | $args = func_get_args(); |
||
6 | |||
7 | if (count($args) === 0) { |
||
8 | return app(\Scuttlebyte\ContextManager\ContextManager::class); |
||
9 | } |
||
10 | |||
11 | if (count($args) === 1) { |
||
12 | if (is_array($args[0])) { |
||
13 | foreach ($args[0] as $alias => $value) { |
||
14 | app(\Scuttlebyte\ContextManager\ContextManager::class)->put($alias, $value); |
||
15 | } |
||
16 | |||
17 | return; |
||
18 | } |
||
19 | |||
20 | return app(\Scuttlebyte\ContextManager\ContextManager::class)->get($args[0]); |
||
21 | } |
||
22 | |||
23 | return app(\Scuttlebyte\ContextManager\ContextManager::class)->put($args[0], $args[1]); |
||
|
|||
24 | } |
||
26 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.