Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 1 |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
63 | 2 | protected function load($entityId) |
|
64 | { |
||
65 | 2 | $table = $this->getEntityDescriptor()->getTableName(); |
|
66 | 2 | $primaryKey = $this->getEntityDescriptor() |
|
67 | 2 | ->getPrimaryKey() |
|
68 | 2 | ->getField(); |
|
69 | 2 | return $this->find() |
|
70 | 2 | ->where( |
|
71 | [ |
||
|
|||
72 | 2 | "{$table}.{$primaryKey} = :id" => [ |
|
73 | ':id' => $entityId |
||
74 | 2 | ] |
|
75 | 2 | ] |
|
76 | 2 | ) |
|
77 | 2 | ->first(); |
|
78 | } |
||
79 | } |
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: