Completed
Pull Request — master (#329)
by Luc
05:18
created

AbstractCommand::getPermission()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace CultuurNet\UDB3\Label\Commands;
4
5
use CultuurNet\UDB3\Offer\Commands\AuthorizableCommandInterface;
6
use CultuurNet\UDB3\Role\ValueObjects\Permission;
7
use ValueObjects\Identity\UUID;
8
9
abstract class AbstractCommand implements AuthorizableCommandInterface
10
{
11
    /**
12
     * @var UUID
13
     */
14
    private $uuid;
15
16
    /**
17
     * AbstractCommand constructor.
18
     * @param UUID $uuid
19
     */
20
    public function __construct(UUID $uuid)
21
    {
22
        $this->uuid = $uuid;
23
    }
24
25
    /**
26
     * @return UUID
27
     */
28
    public function getUuid()
29
    {
30
        return $this->uuid;
31
    }
32
33
    /**
34
     * @inheritdoc
35
     */
36
    public function getItemId()
37
    {
38
        return $this->uuid->toNative();
39
    }
40
41
    /**
42
     * @inheritdoc
43
     */
44
    public function getPermission()
45
    {
46
        return Permission::AANBOD_LABELEN();
47
    }
48
}
49