Completed
Push — master ( e5a769...e9d24b )
by
unknown
15s queued 10s
created

MarkAsDuplicate   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 44
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDuplicatePlaceId() 0 4 1
A getItemId() 0 4 1
A getPermission() 0 4 1
A getCanonicalPlaceId() 0 4 1
1
<?php
2
3
namespace CultuurNet\UDB3\Place\Commands;
4
5
use CultuurNet\UDB3\Offer\Commands\AuthorizableCommandInterface;
6
use CultuurNet\UDB3\Role\ValueObjects\Permission;
7
8
final class MarkAsDuplicate implements AuthorizableCommandInterface
9
{
10
    /**
11
     * @var string
12
     */
13
    private $duplicatePlaceId;
14
15
    /**
16
     * @var string
17
     */
18
    private $canonicalPlaceId;
19
20
    public function __construct(string $duplicatePlaceId, string $canonicalPlaceId)
21
    {
22
        $this->duplicatePlaceId = $duplicatePlaceId;
23
        $this->canonicalPlaceId = $canonicalPlaceId;
24
    }
25
26
    public function getDuplicatePlaceId(): string
27
    {
28
        return $this->duplicatePlaceId;
29
    }
30
31
    public function getCanonicalPlaceId(): string
32
    {
33
        return $this->canonicalPlaceId;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getItemId()
40
    {
41
        return $this->duplicatePlaceId;
42
    }
43
44
    /**
45
     * @return Permission
46
     */
47
    public function getPermission()
48
    {
49
        return Permission::GEBRUIKERS_BEHEREN();
50
    }
51
}
52