1 | <?php |
||
12 | trait HasTranslations |
||
13 | { |
||
14 | use BaseHasTranslations; |
||
15 | |||
16 | /** |
||
17 | * @param string $key |
||
18 | * |
||
19 | * @return mixed |
||
20 | */ |
||
21 | public function getAttributeValue($key) |
||
29 | |||
30 | /** |
||
31 | * Get translations. |
||
32 | * |
||
33 | * @param $key |
||
34 | * |
||
35 | * @return array |
||
36 | */ |
||
37 | public function getTranslations($key): array |
||
59 | |||
60 | /** |
||
61 | * Convert the model's attributes to an array. |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | public function attributesToArray() |
||
73 | |||
74 | /** |
||
75 | * Merge new translatable with existing translatable on the model. |
||
76 | * |
||
77 | * @param array $translatable |
||
78 | * @return void |
||
79 | */ |
||
80 | public function mergeTranslatable($translatable) |
||
84 | } |
||
85 |
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: