Id   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 23
rs 10
c 1
b 1
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toNative() 0 4 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