LogicalDisk   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 2
eloc 20
dl 0
loc 44
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getVolumeName() 0 3 1
A query() 0 3 1
1
<?php
2
3
namespace PhpWinTools\WmiScripting\Models;
4
5
use PhpWinTools\WmiScripting\Cim\CimLogicalDisk;
6
use PhpWinTools\WmiScripting\Query\LogicalDiskBuilder;
7
8
/**
9
 * @link https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-logicaldisk
10
 */
11
class LogicalDisk extends CimLogicalDisk
12
{
13
    protected $uuid = '{8502C52C-5FBB-11D2-AAC1-006008C78BC7}';
14
15
    protected $compressed;
16
17
    protected $driveType;
18
19
    protected $fileSystem;
20
21
    protected $maximumComponentLength;
22
23
    protected $mediaType;
24
25
    protected $providerName;
26
27
    protected $quotasDisabled;
28
29
    protected $quotasIncomplete;
30
31
    protected $quotasRebuilding;
32
33
    protected $supportsDiskQuotas;
34
35
    protected $supportsFileBasedCompression;
36
37
    protected $volumeDirty;
38
39
    protected $volumeName;
40
41
    protected $volumeSerialNumber;
42
43
    protected $attribute_casting = [
44
        'driveType' => 'int',
45
    ];
46
47 2
    public static function query($connection = null)
48
    {
49 2
        return new LogicalDiskBuilder($self = new static(), $self->getConnection($connection));
50
    }
51
52
    public function getVolumeName()
53
    {
54
        return $this->getAttribute('volumeName');
55
    }
56
}
57