| Total Complexity | 6 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Config |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $file = 'config.yml'; |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $directory = 'config'; |
||
| 23 | /** |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | private $config; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Config constructor. |
||
| 30 | */ |
||
| 31 | public function __construct() |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string $file |
||
| 50 | */ |
||
| 51 | public function setFile(string $file): void |
||
| 52 | { |
||
| 53 | $this->file = $file; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $directory |
||
| 58 | */ |
||
| 59 | public function setDirectory(string $directory): void |
||
| 60 | { |
||
| 61 | $this->directory = $directory; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param string $field |
||
| 66 | * |
||
| 67 | * @return mixed |
||
| 68 | */ |
||
| 69 | public function get(string $field) |
||
| 70 | { |
||
| 71 | $dot = new Dot($this->config); |
||
| 72 | |||
| 73 | return $dot->get($field); |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return array |
||
| 78 | */ |
||
| 79 | public function getAll(): array |
||
| 82 | } |
||
| 83 | } |