Total Complexity | 5 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | class Context |
||
14 | { |
||
15 | /** |
||
16 | * @param string $name |
||
17 | * @param $value |
||
18 | */ |
||
19 | public static function set(string $name, $value): void |
||
20 | { |
||
21 | Co::getContext()[$name] = $value; |
||
|
|||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param string $name |
||
26 | * @return mixed |
||
27 | */ |
||
28 | public static function get(string $name) |
||
29 | { |
||
30 | return isset(Co::getContext()[$name]) ? Co::getContext()[$name] : null; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param string $name |
||
35 | * @return bool |
||
36 | */ |
||
37 | public static function has(string $name): bool |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param string $name |
||
44 | */ |
||
45 | public static function delete(string $name): void |
||
48 | } |
||
49 | } |
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.