Passed
Push — master ( 1b58c8...5bb8d0 )
by Aleksandr
02:30
created

UtilityTrait::getEnvs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sanchescom\WiFi\System\Linux;
6
7
trait UtilityTrait
8
{
9
    /** @var string */
10
    private static $utility = 'nmcli';
11
    
12
    /**
13
     * @return string
14
     */
15
    public function getUtility()
16
    {
17
        return implode(' ', array_merge($this->getEnvs(), [
18
            static::$utility,
0 ignored issues
show
Bug introduced by
Since $utility is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $utility to at least protected.
Loading history...
19
        ]));
20
    }
21
    
22
    private function getEnvs()
23
    {
24
        return [
25
            'LANG=C',
26
        ];
27
    }
28
}
29