VOResource   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 24
c 0
b 0
f 0
wmc 3
lcom 0
cbo 2
ccs 7
cts 7
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A getValue() 0 4 1
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
    /**
29
     * @return resource
30
     */
31 7
    public function getValue()
32
    {
33 7
        return parent::getValue();
34
    }
35
}
36