Id::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Cubiche\Domain\Identity;
13
14
use Cubiche\Domain\Model\NativeValueObject;
15
use Cubiche\Domain\Model\IdInterface;
16
17
/**
18
 * Abstract Id Class.
19
 *
20
 * @author Karel Osorio Ramírez <[email protected]>
21
 * @author Ivannis Suárez Jerez <[email protected]>
22
 */
23
abstract class Id extends NativeValueObject implements IdInterface
24
{
25
    /**
26
     * @var mixed
27
     */
28
    protected $value;
29
30
    /**
31
     * @param mixed $value
32
     */
33
    protected function __construct($value)
34
    {
35
        $this->value = $value;
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    public function toNative()
42
    {
43
        return $this->value->toNative();
44
    }
45
}
46