1<?php 2 3/* 4 * This file is part of Respect/Validation. 5 * 6 * (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net> 7 * 8 * For the full copyright and license information, please view the "LICENSE.md" 9 * file that was distributed with this source code. 10 */ 11 12namespace Respect\Validation\Rules; 13 14class Even extends AbstractRule 15{ 16 public function validate($input) 17 { 18 return ((int) $input % 2 === 0); 19 } 20} 21