Total Complexity | 7 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 90.48% |
Changes | 0 |
1 | <?php |
||
9 | class Config |
||
10 | { |
||
11 | /** @var Filesystem */ |
||
12 | protected $files; |
||
13 | |||
14 | /** @var PorterLibrary */ |
||
15 | private $porterLibrary; |
||
16 | |||
17 | 4 | public function __construct(Filesystem $files, PorterLibrary $porterLibrary) |
|
18 | { |
||
19 | 4 | $this->files = $files; |
|
20 | 4 | $this->porterLibrary = $porterLibrary; |
|
21 | 4 | } |
|
22 | |||
23 | 1 | public function updateDomain($from, $to) |
|
24 | { |
||
25 | 1 | $newConfig = preg_replace("/\/.{$from}\//", "/.{$to}/", $this->getConfig()); |
|
26 | |||
27 | 1 | $this->putConfig($newConfig); |
|
28 | 1 | } |
|
29 | |||
30 | 1 | public function updateIp($to) |
|
36 | 1 | } |
|
37 | |||
38 | 2 | protected function getPath() |
|
41 | } |
||
42 | |||
43 | 2 | protected function getConfig() |
|
49 | } |
||
50 | } |
||
51 | |||
52 | 2 | protected function putConfig($content) |
|
55 | 2 | } |
|
56 | } |
||
57 |