Result::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Zortje\Rules;
4
5
/**
6
 * Class Result
7
 *
8
 * @package Zortje\Rules
9
 */
10
class Result
11
{
12
13
    /**
14
     * @var string
15
     */
16
    protected $context;
17
18
    /**
19
     * @var string
20
     */
21
    protected $description;
22
23
    /**
24
     * RuleResult constructor.
25
     *
26
     * @param string $context
27
     * @param string $description
28
     */
29 1
    public function __construct(string $context, string $description)
30
    {
31 1
        $this->context     = $context;
32 1
        $this->description = $description;
33 1
    }
34
35
    /**
36
     * Get result context
37
     *
38
     * @return string Result context
39
     */
40 1
    public function getContext()
41
    {
42 1
        return $this->context;
43
    }
44
45
    /**
46
     * Get result description
47
     *
48
     * @return string Result description
49
     */
50 1
    public function getDescription()
51
    {
52 1
        return $this->description;
53
    }
54
}
55