1 | <?php |
||
9 | class Encrypted implements CastsAttributes |
||
10 | { |
||
11 | /** |
||
12 | * Cast the given value and decrypt |
||
13 | * |
||
14 | * @param \Illuminate\Database\Eloquent\Model $model |
||
15 | * @param string $key |
||
16 | * @param mixed $value |
||
17 | * @param array $attributes |
||
18 | * @return array |
||
19 | */ |
||
20 | public function get($model, $key, $value, $attributes) |
||
28 | |||
29 | /** |
||
30 | * Prepare the given value for storage. |
||
31 | * |
||
32 | * @param \Illuminate\Database\Eloquent\Model $model |
||
33 | * @param string $key |
||
34 | * @param array $value |
||
35 | * @param array $attributes |
||
36 | * @return string |
||
37 | */ |
||
38 | public function set($model, $key, $value, $attributes) |
||
46 | } |
||
47 |
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: