Conditions | 5 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
7 | 12 | * @internal Uses for custom casting implementation |
|
8 | */ |
||
9 | 12 | trait EnumCastable |
|
10 | { |
||
11 | 12 | public function get($model, string $key, $value, array $attributes) |
|
12 | 9 | { |
|
13 | return new static($value); |
||
14 | 9 | } |
|
15 | 9 | ||
16 | public function set($model, string $key, $value, array $attributes) |
||
17 | { |
||
18 | if ($value instanceof static) { |
||
19 | 12 | return $value->getValue(); |
|
20 | } |
||
21 | |||
25 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.