Completed
Push — master ( 5c637b...29a871 )
by Adam
02:41
created

VOResource   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 16
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
namespace BestServedCold\PhalueObjects;
4
5
use BestServedCold\PhalueObjects\Exception\InvalidTypeException;
6
7
/**
8
 * Class VOResource
9
 *
10
 * @package BestServedCold\PhalueObjects
11
 */
12
class VOResource extends ValueObject
13
{
14
    /**
15
     * VOResource constructor.
16
     *
17
     * @param $value
18
     */
19 7
    public function __construct($value)
20
    {
21 7
        if (!is_resource($value)) {
22 1
            throw new InvalidTypeException($value, [ 'object' ]);
23
        }
24
25 7
        parent::__construct($value);
26 7
    }
27
}
28