Completed
Push — master ( 825b2b...9563c8 )
by René
03:01
created

Subject   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 53
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getContextDescription() 0 4 1
A setDom() 0 4 1
A getDom() 0 4 1
1
<?php
2
3
namespace Zortje\Rules;
4
5
/**
6
 * Class Subject
7
 *
8
 * @package Zortje\Rules
9
 */
10
class Subject
11
{
12
13
    /**
14
     * @var string
15
     */
16
    protected $contextDescription;
17
18
    /**
19
     * @var \DOMDocument
20
     */
21
    protected $dom;
22
23
    /**
24
     * RuleSubject constructor.
25
     *
26
     * @param string $contextDescription
27
     */
28 1
    public function __construct(string $contextDescription)
29
    {
30 1
        $this->contextDescription = $contextDescription;
31 1
    }
32
33
    /**
34
     * Get subject context description
35
     *
36
     * @return string Subject context description
37
     */
38 1
    public function getContextDescription(): string
39
    {
40 1
        return $this->contextDescription;
41
    }
42
43
    /**
44
     * Set DOM in subject
45
     *
46
     * @param \DOMDocument $dom
47
     */
48 1
    public function setDom(\DOMDocument $dom)
49
    {
50 1
        $this->dom = $dom;
51 1
    }
52
53
    /**
54
     * Get subject DOM
55
     *
56
     * @return \DOMDocument
57
     */
58 1
    public function getDom(): \DOMDocument
59
    {
60 1
        return $this->dom;
61
    }
62
}
63