VOResource::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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