| Total Complexity | 6 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Config |
||
| 11 | { |
||
| 12 | /** @var array */ |
||
| 13 | private $configurationArray; |
||
| 14 | |||
| 15 | public function __construct(array $configurationArray) |
||
| 16 | { |
||
| 17 | $this->configurationArray = $configurationArray; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getInterfaceIp(): HostInterface |
||
| 21 | { |
||
| 22 | return new HostInterface($this->configurationArray['ip']); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getPort(): Port |
||
| 26 | { |
||
| 27 | return new Port((int) $this->configurationArray['port']); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function isDebugMode(): bool |
||
| 31 | { |
||
| 32 | return $this->configurationArray['debug']; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getExpectationsPath(): ExpectationsDirectory |
||
| 36 | { |
||
| 37 | return new ExpectationsDirectory($this->configurationArray['expectations-dir']); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getFactoryClassName(): PhpFactoryFqcn |
||
| 43 | } |
||
| 44 | } |
||
| 45 |