src/Amount.php
protected function validateNumber($number) {
    if (!(is_int($number) || is_string($number) && is_numeric($number))) {
      $type = is_object($number) ? get_class($number) : gettype($number);
      throw new \InvalidArgumentException(sprintf('An integer or numeric string was expected, but %s was given.', $type));
    }
  }
protected function validateNumber($number) {
    if (!(is_int($number) || is_string($number) && is_numeric($number))) {
      $type = is_object($number) ? get_class($number) : gettype($number);
      throw new \InvalidArgumentException(sprintf('An integer or numeric string was expected, but %s was given.', $type));
    }
  }
protected function validateNumber ( $ number ) { if ( ! ( is_int ( $ number ) || is_string ( $ number ) && is_numeric ( $ number ) ) ) { $ type = is_object ( $ number ) ? get_class ( $ number ) : gettype ( $ number ) ; throw new \ InvalidArgumentException ( sprintf ( 'An integer or numeric string was expected, but %s was given.' , $ type ) ) ; } }
Checks that a value is a number.

@param mixed $number
Checks that a value is a number .