LogicalDisk::query()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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