Completed
Push — master ( 64eb17...b1edff )
by Joe
01:48
created

ComWrapper   A

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 COM as ComExt;
6
use PhpWinTools\Support\COM\Testing\COMFake;
7
use PhpWinTools\WmiScripting\Configuration\Config;
8
use PhpWinTools\WmiScripting\Exceptions\ComWrapperException;
9
10
class ComWrapper extends ComVariantWrapper
11
{
12 2
    public function __construct($com, Config $config = null)
13
    {
14 2
        if (!$com instanceof Comext && !$com instanceof COMFake) {
15
            throw new ComWrapperException('Must be an instance of COM or COMFake Given: '
16
                . get_class($com));
17
        }
18
19 2
        parent::__construct($com, $config);
20 2
    }
21
}
22