Prerequisite::getDescription()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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