Passed
Branch master (8d5159)
by Chris
03:00
created

Task::getStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace ChrisArmitage\ScalewayApi\Domain;
4
5
class Task
6
{
7
    protected $description;
8
    protected $progress;
9
    protected $status;
10
11
    protected function __construct($description, $progress, $status) {
12
        $this->description = $description;
13
        $this->progress = $progress;
14
        $this->status = $status;
15
    }
16
17
    static public function makeFromTaskJson($taskJson) {
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
18
        return new static(
19
            $taskJson->description,
20
            $taskJson->progress,
21
            $taskJson->status
22
        );
23
    }
24
25
    /**
26
     * @return mixed
27
     */
28
    public function getDescription() {
29
        return $this->description;
30
    }
31
32
    /**
33
     * @return mixed
34
     */
35
    public function getProgress() {
36
        return $this->progress;
37
    }
38
39
    /**
40
     * @return mixed
41
     */
42
    public function getStatus() {
43
        return $this->status;
44
    }
45
}