Completed
Pull Request — master (#143)
by Beñat
03:38
created

CreateTaskCommand   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 87
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 11
lcom 0
cbo 0
dl 0
loc 87
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 23 1
A title() 0 4 1
A description() 0 4 1
A creatorMemberId() 0 4 1
A creatorUserId() 0 4 1
A assigneeMemberId() 0 4 1
A assigneeUserId() 0 4 1
A priority() 0 4 1
A projectId() 0 4 1
A parentId() 0 4 1
A taskId() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Kreta\TaskManager\Application\Project\Task;
6
7
class CreateTaskCommand
8
{
9
    private $title;
10
    private $description;
11
    private $creatorMemberId;
12
    private $creatorUserId;
13
    private $assigneeMemberId;
14
    private $assigneeUserId;
15
    private $priority;
16
    private $projectId;
17
    private $parentId;
18
    private $taskId;
19
20
    public function __construct(
21
        string $title,
22
        string $description,
23
        string $creatorMemberId,
24
        string $creatorUserId,
25
        string $assigneeMemberId,
26
        string $assigneeUserId,
27
        string $priority,
28
        string $projectId,
29
        string $parentId = null,
30
        string $taskId = null
31
    ) {
32
        $this->title = $title;
33
        $this->description = $description;
34
        $this->creatorMemberId = $creatorMemberId;
35
        $this->creatorUserId = $creatorUserId;
36
        $this->assigneeMemberId = $assigneeMemberId;
37
        $this->assigneeUserId = $assigneeUserId;
38
        $this->priority = $priority;
39
        $this->projectId = $projectId;
40
        $this->parentId = $parentId;
41
        $this->taskId = $taskId;
42
    }
43
44
    public function title() : string
45
    {
46
        return $this->title;
47
    }
48
49
    public function description() : string
50
    {
51
        return $this->description;
52
    }
53
54
    public function creatorMemberId() : string
55
    {
56
        return $this->creatorMemberId;
57
    }
58
59
    public function creatorUserId() : string
60
    {
61
        return $this->creatorUserId;
62
    }
63
64
    public function assigneeMemberId() : string
65
    {
66
        return $this->assigneeMemberId;
67
    }
68
69
    public function assigneeUserId() : string
70
    {
71
        return $this->assigneeUserId;
72
    }
73
74
    public function priority() : string
75
    {
76
        return $this->priority;
77
    }
78
79
    public function projectId() : string
80
    {
81
        return $this->projectId;
82
    }
83
84
    public function parentId()
85
    {
86
        return $this->parentId;
87
    }
88
89
    public function taskId()
90
    {
91
        return $this->taskId;
92
    }
93
}
94