VariantWrapper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 10
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 3
1
<?php
2
3
namespace PhpWinTools\Support\COM;
4
5
use VARIANT as VariantExt;
6
use PhpWinTools\WmiScripting\Configuration\Config;
7
use PhpWinTools\WmiScripting\Testing\Support\VARIANTFake;
8
use PhpWinTools\WmiScripting\Exceptions\VariantWrapperException;
9
10
class VariantWrapper extends ComVariantWrapper
11
{
12 2
    public function __construct($variant, Config $config = null)
13
    {
14 2
        if (!$variant instanceof VariantExt && !$variant instanceof VARIANTFake) {
15
            throw new VariantWrapperException('Must be an instance of VARIANT or VARIANTFake. Given: '
16
                . get_class($variant));
17
        }
18
19 2
        parent::__construct($variant, $config);
20 2
    }
21
}
22