Completed
Push — master ( 10b44f...a11b2a )
by Thijs
17:21 queued 17:19
created

Task   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 57
ccs 7
cts 7
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace TestMonitor\DoneDone\Resources;
4
5
class Task extends Resource
6
{
7
    /**
8
     * The id of the issue.
9
     *
10
     * @var string
11
     */
12
    public $id;
13
14
    /**
15
     * The title of the task.
16
     *
17
     * @var string
18
     */
19
    public $title;
20
21
    /**
22
     * The description of the task.
23
     *
24
     * @var string
25
     */
26
    public $description;
27
28
    /**
29
     * The task status.
30
     *
31
     * @var array
32
     */
33
    public $status;
34
35
    /**
36
     * The task priority.
37
     *
38
     * @var array
39
     */
40
    public $priority;
41
42
    /**
43
     * The task assignee.
44
     *
45
     * @var array
46
     */
47
    public $assignee;
48
49
    /**
50
     * Create a new resource instance.
51
     *
52
     * @param $attributes
53
     */
54 3
    public function __construct(array $attributes)
55
    {
56 3
        $this->id = $attributes['id'] ?? null;
57 3
        $this->title = $attributes['title'];
58 3
        $this->description = $attributes['description'];
59 3
        $this->status = $attributes['status'];
60 3
        $this->priority = $attributes['priority'] ?? null;
61 3
        $this->assignee = $attributes['assignee'] ?? null;
62 3
    }
63
}
64