Test Failed
Branch feature__set_up_scrutinizer (ea6624)
by Robin
06:04 queued 02:46
created

Container   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 9
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateDomain() 0 7 1
1
<?php
2
3
namespace App\Support\Dnsmasq;
4
5
6
class Container
7
{
8
    public function updateDomain($from, $to)
9
    {
10
        $filePath = config('porter.library_path').'/config/dnsmasq/dnsmasq.conf';
11
12
        $newConfig = preg_replace("/\/.{$from}\//", "/.{$to}/", file_get_contents($filePath));
13
14
        file_put_contents($filePath, $newConfig);
15
    }
16
}
17