Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
4 / 4
Futuristic
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
6
100.00% covered (success)
100.00%
4 / 4
 isLeapYear
100.00% covered (success)
100.00%
1 / 1
6
100.00% covered (success)
100.00%
4 / 4
<?php
namespace Popy\Calendar\Converter\LeapYearCalculator;
use Popy\Calendar\Converter\SimpleLeapYearCalculatorInterface;
/**
 * Futuristic leap day implementation, more precise than the modern one,
 * but not officially used.
 */
class Futuristic implements SimpleLeapYearCalculatorInterface
{
    /**
     * @inheritDoc
     */
    public function isLeapYear($year)
    {
        return !($year % 4) && ($year % 100)
            || !($year % 400) && ($year % 2000)
            || !($year % 4000) && ($year % 20000)
        ;
    }
}