Task   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 41
ccs 17
cts 17
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A makeFromTaskJson() 0 7 1
A getDescription() 0 3 1
A getProgress() 0 3 1
A getStatus() 0 3 1
1
<?php
2
3
namespace ChrisArmitage\ScalewayApi\Domain;
4
5
class Task
6
{
7
    protected $description;
8
    protected $progress;
9
    protected $status;
10
11 1
    protected function __construct($description, $progress, $status) {
12 1
        $this->description = $description;
13 1
        $this->progress = $progress;
14 1
        $this->status = $status;
15 1
    }
16
17 1
    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 1
        return new static(
19 1
            $taskJson->description,
20 1
            $taskJson->progress,
21 1
            $taskJson->status
22 1
        );
23
    }
24
25
    /**
26
     * @return mixed
27
     */
28 1
    public function getDescription() {
29 1
        return $this->description;
30
    }
31
32
    /**
33
     * @return mixed
34
     */
35 1
    public function getProgress() {
36 1
        return $this->progress;
37
    }
38
39
    /**
40
     * @return mixed
41
     */
42 1
    public function getStatus() {
43 1
        return $this->status;
44
    }
45
}