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

Futuristic   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 6

1 Method

Rating   Name   Duplication   Size   Complexity  
B isLeapYear() 0 5 6
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