1 | <?php |
||
16 | class CodeigniterModel extends \CI_Model |
||
17 | { |
||
18 | /** |
||
19 | * @var \Rougin\Credo\Credo |
||
20 | */ |
||
21 | protected $credo; |
||
22 | |||
23 | /** |
||
24 | * @var \Doctrine\ORM\EntityRepository |
||
25 | */ |
||
26 | protected $repository; |
||
27 | |||
28 | 3 | public function __construct() |
|
35 | |||
36 | /** |
||
37 | * Returns all of the models from the database. |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | 3 | public function all() |
|
45 | |||
46 | /** |
||
47 | * Deletes the specified ID of the model from the database. |
||
48 | * |
||
49 | * @param integer $id |
||
50 | * @return void |
||
51 | */ |
||
52 | 3 | public function delete($id) |
|
59 | |||
60 | /** |
||
61 | * Finds an entity by its primary key / identifier. |
||
62 | * |
||
63 | * @param mixed $id |
||
64 | * @param int|null $lockMode |
||
65 | * @param int|null $lockVersion |
||
66 | * @return object|null |
||
67 | */ |
||
68 | 9 | public function find($id, $lockMode = null, $lockVersion = null) |
|
72 | |||
73 | /** |
||
74 | * Finds models by a set of criteria. |
||
75 | * |
||
76 | * @param array $criteria |
||
77 | * @param array|null $orderBy |
||
78 | * @param integer|null $limit |
||
79 | * @param integer|null $offset |
||
80 | * @return array |
||
81 | */ |
||
82 | 3 | public function find_by(array $criteria, array $orderBy = null, $limit = null, $offset = null) |
|
86 | |||
87 | /** |
||
88 | * Inserts a new row into the table. |
||
89 | * |
||
90 | * @param array $data |
||
91 | * @return integer |
||
92 | */ |
||
93 | 3 | public function insert(array $data) |
|
106 | |||
107 | /** |
||
108 | * Updates the selected row from the table. |
||
109 | * |
||
110 | * @param integer $id |
||
111 | * @param array $data |
||
112 | * @return boolean |
||
113 | */ |
||
114 | 3 | public function update($id, array $data) |
|
128 | } |
||
129 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: