Completed
Pull Request — master (#394)
by Kristof
03:19
created

RemoveConstraint   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getSapiVersion() 0 4 1
1
<?php
2
3
namespace CultuurNet\UDB3\Role\Commands;
4
5
use ValueObjects\Identity\UUID;
6
use CultuurNet\UDB3\ValueObject\SapiVersion;
7
8
class RemoveConstraint extends AbstractCommand
9
{
10
    /**
11
     * @var string
12
     */
13
    private $sapiVersion;
14
15
    /**
16
     * @param UUID $uuid
17
     * @param SapiVersion $sapiVersion
18
     */
19
    public function __construct(
20
        UUID $uuid,
21
        SapiVersion $sapiVersion
22
    ) {
23
        parent::__construct($uuid);
24
        $this->sapiVersion = $sapiVersion->toNative();
25
    }
26
27
    /**
28
     * @return SapiVersion
29
     */
30
    public function getSapiVersion(): SapiVersion
31
    {
32
        return SapiVersion::fromNative($this->sapiVersion);
33
    }
34
}
35