Prerequisite   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCondition() 0 4 1
A getDescription() 0 4 1
1
<?php
2
namespace PSB\Core\Feature;
3
4
5
class Prerequisite
6
{
7
    /**
8
     * @var callable
9
     */
10
    private $condition;
11
12
    /**
13
     * @var string
14
     */
15
    private $description;
16
17
    /**
18
     * @param callable $condition
19
     * @param string   $description
20
     */
21 10
    public function __construct(callable $condition, $description)
22
    {
23 10
        $this->condition = $condition;
24 10
        $this->description = $description;
25 10
    }
26
27
    /**
28
     * @return callable
29
     */
30 4
    public function getCondition()
31
    {
32 4
        return $this->condition;
33
    }
34
35
    /**
36
     * @return string
37
     */
38 1
    public function getDescription()
39
    {
40 1
        return $this->description;
41
    }
42
}
43