| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ConfigReader |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @return array |
||
| 11 | * @throws Exception |
||
| 12 | */ |
||
| 13 | public static function get(): array |
||
| 14 | { |
||
| 15 | $configPath = require self::getBasePath() . 'config/mailer.php'; |
||
| 16 | |||
| 17 | if (! is_array($configPath)) { |
||
| 18 | throw new Exception('The configuration format is invalid. It must be an array!'); |
||
| 19 | } |
||
| 20 | |||
| 21 | return $configPath; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | public static function getBasePath(): string |
||
| 30 | } |
||
| 31 | } |
||
| 32 |