| Conditions | 4 |
| Paths | 5 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4.3731 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 2 | private function fill(array $data, array $exclude = null, NameConverterInterface $converter = null) |
|
|
|
|||
| 23 | { |
||
| 24 | 2 | foreach ($data as $key => $value) { |
|
| 25 | 2 | if ($converter) { |
|
| 26 | $key = $converter->denormalize($key); |
||
| 27 | } |
||
| 28 | 2 | if (!\property_exists($this, $key)) { |
|
| 29 | throw new BadArgumentException(\sprintf('Argument %s not found in %s', $key, self::class)); |
||
| 30 | } |
||
| 31 | 2 | $this->{$key} = $value; |
|
| 32 | } |
||
| 35 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.