Futuristic   A
last analyzed

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
use Popy\Calendar\Converter\SimpleLeapYearCalculatorInterface;
6
7
/**
8
 * Futuristic leap day implementation, more precise than the modern one,
9
 * but not officially used.
10
 */
11
class Futuristic implements SimpleLeapYearCalculatorInterface
12
{
13
    /**
14
     * @inheritDoc
15
     */
16
    public function isLeapYear($year)
17
    {
18
        return !($year % 4) && ($year % 100)
19
            || !($year % 400) && ($year % 2000)
20
            || !($year % 4000) && ($year % 20000)
21
        ;
22
    }
23
}
24