Completed
Push — master ( b7fe7e...4bccf1 )
by Peter
01:34
created

HourlyIntervalRuleTrait   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setStart() 0 4 1
A setEnd() 0 4 1
A start() 0 4 1
A end() 0 4 1
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 */
8
9
namespace AnimeDb\SmartSleep\Rule;
10
11
trait HourlyIntervalRuleTrait
12
{
13
    /**
14
     * @var int
15
     */
16
    private $start = -1;
17
18
    /**
19
     * @var int
20
     */
21
    private $end = -1;
22
23
    /**
24
     * @param int $start
25
     */
26 34
    protected function setStart($start)
27
    {
28 34
        $this->start = $start;
29 34
    }
30
31
    /**
32
     * @param int $end
33
     */
34 34
    protected function setEnd($end)
35
    {
36 34
        $this->end = $end;
37 34
    }
38
39
    /**
40
     * @return int
41
     */
42 34
    public function start()
43
    {
44 34
        return $this->start;
45
    }
46
47
    /**
48
     * @return int
49
     */
50 34
    public function end()
51
    {
52 34
        return $this->end;
53
    }
54
}
55