CorrectWeekday   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 41
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setActualWeekday() 0 4 1
A setExpectedWeekday() 0 4 1
A isMet() 0 4 1
1
<?php
2
3
namespace Example\Simple\Items;
4
5
use Net\Bazzline\Component\Requirement\AbstractItem;
6
7
/**
8
 * Class CorrectWeekday
9
 *
10
 * @author jens
11
 * @since 2013-06-27
12
 */
13
class CorrectWeekday extends AbstractItem
14
{
15
    /** @var integer */
16
    protected $expectedWeekday;
17
18
    /** @var integer */
19
    protected $actualWeekday;
20
21
    /**
22
     * @param $expectedWeekday
23
     */
24
    public function __construct($expectedWeekday)
25
    {
26
        $this->setExpectedWeekday($expectedWeekday);
27
    }
28
29
    /**
30
     * @param int $actualWeekday
31
     */
32
    public function setActualWeekday($actualWeekday)
33
    {
34
        $this->actualWeekday = $actualWeekday;
35
    }
36
37
    /**
38
     * @param int $expectedWeekday
39
     */
40
    public function setExpectedWeekday($expectedWeekday)
41
    {
42
        $this->expectedWeekday = $expectedWeekday;
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    public function isMet()
49
    {
50
        return ($this->actualWeekday == $this->expectedWeekday);
51
    }
52
53
}