| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function validate(Config $config, array $configuration): void |
||
| 31 | { |
||
| 32 | if (!\array_key_exists(self::KEY, $configuration)) { |
||
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | $value = $configuration[self::KEY]; |
||
| 37 | if (null === $value) { |
||
| 38 | $config->setMinScoreToShow(null); |
||
| 39 | |||
| 40 | return; |
||
| 41 | } |
||
| 42 | |||
| 43 | Assert::numeric($value, 'Minimum score to show should be a number'); |
||
| 44 | |||
| 45 | $config->setMinScoreToShow((float) $value); |
||
| 46 | } |
||
| 48 |