Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| VonMadler | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| isLeapYear | |
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
|||
| <?php | |
| namespace Popy\Calendar\Converter\LeapYearCalculator; | |
| use Popy\Calendar\Converter\SimpleLeapYearCalculatorInterface; | |
| /** | |
| * Von Madler implementation (because why not being wrong in a funny way). | |
| */ | |
| class VonMadler implements SimpleLeapYearCalculatorInterface | |
| { | |
| /** | |
| * @inheritDoc | |
| */ | |
| public function isLeapYear($year) | |
| { | |
| return !($year % 4) && ($year % 128); | |
| } | |
| } |