Total Complexity | 6 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class Blacklist |
||
13 | { |
||
14 | private $app; |
||
15 | |||
16 | private $store; |
||
17 | |||
18 | protected $cacheName = 'blacklist'; |
||
19 | |||
20 | public function __construct(App $app) |
||
21 | { |
||
22 | $this->app = $app; |
||
23 | |||
24 | $this->store = $this->getStore(); |
||
|
|||
25 | } |
||
26 | |||
27 | /** |
||
28 | * 获取 缓存驱动 |
||
29 | * |
||
30 | * @return void |
||
31 | */ |
||
32 | public function getStore() |
||
33 | { |
||
34 | return $this->app->cache; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * 加入黑名单 |
||
39 | * |
||
40 | * @param Token $token |
||
41 | * @return void |
||
42 | */ |
||
43 | public function push(Token $token) |
||
49 | } |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * 是否存在黑名单 |
||
54 | * |
||
55 | * @param Token $token |
||
56 | * @return boolean |
||
57 | */ |
||
58 | public function has(Token $token) |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * 获取所有黑名单 |
||
67 | * |
||
68 | * @return array |
||
69 | */ |
||
70 | public function getAll() |
||
75 |
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.