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

RemoveConstraint::getSapiVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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