Conditions | 2 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
42 | 5 | public function arrayToProperties(?array $data, mixed $rescue = null): void |
|
43 | { |
||
44 | 5 | collect($data ?? []) |
|
45 | 5 | ->except($this->ignoreKeys()) |
|
46 | 5 | ->each(function ($value, $key) use ($rescue) { |
|
47 | 5 | if ($this->canWalkRecursively($value, $key)) { |
|
48 | $this->arrayToProperties($value, $rescue); |
||
49 | } |
||
50 | |||
51 | 5 | $this->assignValue($key, $value, $rescue); |
|
52 | }); |
||
55 |