Windows::flushDns()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace App\Support\Mechanics;
4
5
class Windows extends Untrained
6
{
7
    /**
8
     * Return the User's home directory path.
9
     *
10
     * @return string
11
     */
12 1
    public function getUserHomePath()
13
    {
14 1
        return $this->serverBag->get('HOME') ?? $this->serverBag->get('HOMEDRIVE').$this->serverBag->get('HOMEPATH');
15
    }
16
17
    /**
18
     * Flush the host system DNS cache.
19
     *
20
     * @return void
21
     */
22
    public function flushDns()
23
    {
24
        $this->consoleWriter->info('Flushing DNS.');
25
        $this->cli->passthru('ipconfig /flushdns');
26
    }
27
}
28