1 | <?php |
||
13 | abstract class AbstractEntity implements EntityInterface |
||
14 | { |
||
15 | const PER_CALL = 50; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected static $endpoint; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected static $idField; |
||
26 | |||
27 | /** |
||
28 | * @var Api |
||
29 | */ |
||
30 | protected $api; |
||
31 | |||
32 | /** |
||
33 | * AbstractEntity constructor. |
||
34 | * @param ApiInterface $api |
||
35 | */ |
||
36 | 4 | public function __construct(ApiInterface $api) |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function getById($id, array $options = []) |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function post($data, array $options = []) |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function get(array $query = [], array $options = []) |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function getAll(array $query = [], array $options = []) |
||
108 | |||
109 | /** |
||
110 | * @param array $query |
||
111 | * @param array $options |
||
112 | * @return array |
||
113 | */ |
||
114 | private function setOptions(array $query, array $options) |
||
124 | } |
||
125 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.