Source of file AbstractCompareRule.php
Size: 0,707 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/Validator/Rule/AbstractCompareRule.php
1234567891011121314151617181920212223242526272829303132333435363738394041 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\Validator\Rule; /** * Abstract rule of compare * * @package Bluz\Validator\Rule */ abstract class AbstractCompareRule extends AbstractRule { /** * @var bool compare inclusive or not */ protected $inclusive; /** * Check $what less $than or not * * @param mixed $what * @param mixed $than * * @return bool */ protected function less($what, $than): bool { if ($this->inclusive) { return $what <= $than; } return $what < $than; } } |