Completed
Pull Request — master (#326)
by Luc
04:24
created

Conclude::getPermission()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace CultuurNet\UDB3\Event\Commands;
4
5
use CultuurNet\UDB3\Offer\Commands\AuthorizableCommandInterface;
6
use CultuurNet\UDB3\Role\ValueObjects\Permission;
7
8 View Code Duplication
class Conclude implements AuthorizableCommandInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $itemId;
14
15
    /**
16
     * Conclude constructor.
17
     *
18
     * @param string $itemId
19
     */
20
    public function __construct($itemId)
21
    {
22
        if (!is_string($itemId)) {
23
            throw new \InvalidArgumentException(
24
                'Expected itemId to be a string, received ' . gettype($itemId)
25
            );
26
        }
27
28
        $this->itemId = $itemId;
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getItemId()
35
    {
36
        return $this->itemId;
37
    }
38
39
    /**
40
     * @return Permission
41
     */
42
    public function getPermission()
43
    {
44
        return  Permission::AANBOD_MODEREREN();
45
    }
46
}
47