Functional\Exceptions\InvalidArgumentException::assertInteger PHP Метод

assertInteger() публичный статический Метод

public static assertInteger ( boolean $value, string $callee, integer $parameterPosition )
$value boolean
$callee string
$parameterPosition integer
    public static function assertInteger($value, $callee, $parameterPosition)
    {
        if (!is_integer($value)) {
            throw new static(sprintf('%s() expects parameter %d to be integer', $callee, $parameterPosition));
        }
    }

Usage Example

Пример #1
0
 public function __construct($start, $amount)
 {
     InvalidArgumentException::assertIntegerGreaterThanOrEqual($start, 0, __METHOD__, 1);
     InvalidArgumentException::assertInteger($amount, __METHOD__, 2);
     $this->start = $start;
     $this->amount = $amount;
 }
All Usage Examples Of Functional\Exceptions\InvalidArgumentException::assertInteger