1 | <?php |
||
13 | class Store |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $uid; |
||
19 | |||
20 | /** |
||
21 | * @var Delete |
||
22 | */ |
||
23 | private $delete; |
||
24 | |||
25 | /** |
||
26 | * @var Insert |
||
27 | */ |
||
28 | private $insert; |
||
29 | |||
30 | /** |
||
31 | * Store constructor. |
||
32 | * |
||
33 | * @param Delete $delete |
||
34 | * @param Insert $insert |
||
35 | */ |
||
36 | 3 | public function __construct(Delete $delete, Insert $insert) |
|
41 | |||
42 | /** |
||
43 | * Delete |
||
44 | * |
||
45 | * @param integer $id |
||
46 | * @param bool $uid |
||
47 | * @return Delete |
||
48 | */ |
||
49 | 2 | public function delete($id, $uid = false) |
|
53 | |||
54 | /** |
||
55 | * Insert |
||
56 | * |
||
57 | * @param $id |
||
58 | * @param array $fields |
||
59 | * @param bool $uid |
||
60 | * @return mixed |
||
61 | */ |
||
62 | 1 | public function insert($id, array $fields, $uid = false, $deleteFirst = true) |
|
67 | |||
68 | /** |
||
69 | * Uid |
||
70 | * |
||
71 | * @param $uid |
||
72 | * @return $this |
||
73 | */ |
||
74 | 1 | public function uid($uid) |
|
79 | } |
||
80 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.