We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | protected function populate(array $config): void |
||
22 | { |
||
23 | foreach ($config as $key => $value) { |
||
24 | $property = lcfirst(str_replace('_', '', ucwords($key, '_'))); |
||
25 | $normalizer = static::NORMALIZERS[$property] ?? 'normalize'.ucfirst($property); |
||
26 | if (method_exists($this, $normalizer)) { |
||
27 | $this->$property = $this->$normalizer($value); |
||
28 | } elseif (property_exists($this, $property)) { |
||
29 | $this->$property = $value; |
||
30 | } else { |
||
31 | throw new InvalidArgumentException(sprintf('Unknown config "%s".', $property)); |
||
32 | } |
||
49 |