Windows   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 40%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 21
ccs 2
cts 5
cp 0.4
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A flushDns() 0 4 1
A getUserHomePath() 0 3 1
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