| Total Complexity | 9 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 10 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | class LoadYamlConfiguration |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * Performs a core task that needs to be performed on |
||
| 25 | * early stages of the framework. |
||
| 26 | */ |
||
| 27 | public function bootstrap(Application $app): void |
||
|
|
|||
| 28 | { |
||
| 29 | if ($this->hasYamlConfigFile()) { |
||
| 30 | $this->mergeParsedConfiguration(); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | protected function hasYamlConfigFile(): bool |
||
| 38 | } |
||
| 39 | |||
| 40 | protected function mergeParsedConfiguration(): void |
||
| 41 | { |
||
| 42 | Config::set('site', array_merge( |
||
| 43 | Config::get('site', []), |
||
| 44 | $this->getYaml() |
||
| 45 | )); |
||
| 46 | } |
||
| 47 | |||
| 48 | protected function getYaml(): array |
||
| 53 | } |
||
| 54 | |||
| 55 | protected function getFile(): string |
||
| 60 | } |
||
| 61 | } |
||
| 62 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.