Completed
Push — master ( c7b6b7...06a68c )
by Pierre
06:37
created

Futuristic::isLeapYear()   B

Complexity

Conditions 6
Paths 11

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 6
eloc 3
nc 11
nop 1
dl 0
loc 5
rs 8.8571
c 0
b 0
f 0
1
<?php
2
3
namespace Popy\Calendar\Converter\LeapYearCalculator;
4
5
/**
6
 * Futuristic leap day implementation, more precise than the modern one,
7
 * but not officially used.
8
 */
9
class Futuristic extends AbstractCalculator
10
{
11
    /**
12
     * @inheritDoc
13
     */
14
    public function isLeapYear($year)
15
    {
16
        return !($year % 4) && ($year % 100)
17
            || !($year % 400) && ($year % 2000)
18
            || !($year % 4000) && ($year % 20000)
19
        ;
20
    }
21
}
22