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

EverydayRule::isMatched()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 2
eloc 2
nc 2
nop 1
crap 2
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 View Code Duplication
class EverydayRule extends RandMaxSecondsRuleBase
11
{
12
    /**
13
     * @param \DateTime $time
14
     *
15
     * @return bool
16
     */
17 5
    public function isMatched(\DateTime $time)
18
    {
19 5
        return $this->getStart() <= $time->format('G') && $this->getEnd() > $time->format('G');
20
    }
21
}
22