Back to AfterMoveEvent class

Method setDelta

protected int
setDelta
(mixed $value)
Setter for the delta argument
Parameters
  • int $value The value to set
Returns
  • int
-
  • \BadMethodCallException if the argument is not of the expected type

Method setDelta - Source code

/**
 * Setter for the delta argument
 *
 * @param   int  $value  The value to set
 *
 * @return  integer
 *
 * @throws  BadMethodCallException  if the argument is not of the expected type
 */
protected function setDelta($value)
{
    if (!is_numeric($value)) {
        throw new BadMethodCallException("Argument 'delta' of event {$this->name} must be an integer");
    }
    return (int) $value;
}