| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | final class ConfigurationLogger |
||
| 22 | { |
||
| 23 | private $recommendations = []; |
||
| 24 | private $warnings = []; |
||
| 25 | |||
| 26 | public function addRecommendation(string $message): void |
||
| 33 | } |
||
| 34 | |||
| 35 | public function addWarning(string $message): void |
||
| 36 | { |
||
| 37 | $message = trim($message); |
||
| 38 | |||
| 39 | Assertion::false('' === $message, 'Expected to have a message but a blank string was given instead.'); |
||
| 40 | |||
| 41 | $this->warnings[$message] = $message; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string[] |
||
| 46 | */ |
||
| 47 | public function getRecommendations(): array |
||
| 48 | { |
||
| 49 | return array_keys($this->recommendations); |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string[] |
||
| 54 | */ |
||
| 55 | public function getWarnings(): array |
||
| 58 | } |
||
| 59 | } |
||
| 60 |