| Total Complexity | 8 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 85.71% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | final class GameSettings extends AbstractSettings implements GameSettingsInterface |
||
| 8 | { |
||
| 9 | private const CONFIG_PATH = 'game'; |
||
| 10 | |||
| 11 | private const SETTING_ADMINS = 'admins'; |
||
| 12 | private const SETTING_TEMP_DIR = 'temp_dir'; |
||
| 13 | private const SETTING_VERSION = 'version'; |
||
| 14 | private const SETTING_WEBROOT = 'webroot'; |
||
| 15 | |||
| 16 | 3 | public function getAdminIds(): array |
|
| 19 | } |
||
| 20 | |||
| 21 | public function getAdminSettings(): AdminSettingsInterface |
||
| 24 | } |
||
| 25 | |||
| 26 | 2 | public function getColonySettings(): ColonySettingsInterface |
|
| 27 | { |
||
| 28 | 2 | return new ColonySettings($this->getPath(), $this->getConfig()); |
|
| 29 | } |
||
| 30 | |||
| 31 | 3 | public function getTempDir(): string |
|
| 32 | { |
||
| 33 | return $this->getStringConfigValue(self::SETTING_TEMP_DIR); |
||
| 34 | 3 | } |
|
| 35 | 1 | ||
| 36 | 1 | public function getVersion(): string|int |
|
| 37 | { |
||
| 38 | try { |
||
| 39 | return $this->getIntegerConfigValue(self::SETTING_VERSION); |
||
| 40 | 4 | } catch (StuConfigException $e) { |
|
| 41 | return $this->getStringConfigValue(self::SETTING_VERSION); |
||
| 42 | 4 | } |
|
| 43 | } |
||
| 44 | |||
| 45 | 12 | public function getWebroot(): string |
|
| 48 | } |
||
| 49 | |||
| 50 | public function getConfigPath(): string |
||
| 53 | } |
||
| 54 | } |
||
| 55 |