Completed
Pull Request — master (#329)
by
unknown
06:02
created

AbstractCommand   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 34
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getUuid() 0 4 1
A getItemId() 0 4 1
A getPermission() 0 4 1
1
<?php
2
3
namespace CultuurNet\UDB3\Role\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
    public function getItemId()
34
    {
35
        return (string) $this->getUuid();
36
    }
37
38
    public function getPermission()
39
    {
40
        return Permission::GEBRUIKERS_BEHEREN();
41
    }
42
}
43