Completed
Push — master ( 0ebeda...45d090 )
by Peter
02:31
created

RuleBase   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getStart() 0 4 1
A setStart() 0 6 1
A getEnd() 0 4 1
A setEnd() 0 6 1
A getSeconds() 0 4 1
A setSeconds() 0 6 1
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 */
8
namespace AnimeDb\SmartSleep\Rule;
9
10
abstract class RuleBase implements RuleInterface
11
{
12
    /**
13
     * @var int
14
     */
15
    private $start = -1;
16
17
    /**
18
     * @var int
19
     */
20
    private $end = -1;
21
22
    /**
23
     * @var int
24
     */
25
    private $seconds = 0;
26
27
    /**
28
     * @return int
29
     */
30 27
    public function getStart()
31
    {
32 27
        return $this->start;
33
    }
34
35
    /**
36
     * @param int $start
37
     *
38
     * @return RuleBase
39
     */
40 33
    public function setStart($start)
41
    {
42 33
        $this->start = $start;
43
44 33
        return $this;
45
    }
46
47
    /**
48
     * @return int
49
     */
50 24
    public function getEnd()
51
    {
52 24
        return $this->end;
53
    }
54
55
    /**
56
     * @param int $end
57
     *
58
     * @return RuleBase
59
     */
60 33
    public function setEnd($end)
61
    {
62 33
        $this->end = $end;
63
64 33
        return $this;
65
    }
66
67
    /**
68
     * @return int
69
     */
70 6
    public function getSeconds()
71
    {
72 6
        return $this->seconds;
73
    }
74
75
    /**
76
     * @param int $seconds
77
     *
78
     * @return RuleBase
79
     */
80 9
    public function setSeconds($seconds)
81
    {
82 9
        $this->seconds = $seconds;
83
84 9
        return $this;
85
    }
86
}
87