public static function isScalar($value, $message = null)
    {
        if (!is_scalar($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected scalar, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
public static function isScalar($value, $message = null)
    {
        if (!is_scalar($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected scalar, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
public static function isScalar ( $ value , $ message = null ) { if ( ! is_scalar ( $ value ) ) { throw new InvalidArgumentException ( sprintf ( $ message ? : 'Expected scalar, but got %s' , Helper :: typeToString ( $ value ) ) ) ; } }
Assert that the value is scalar.

@param mixed  $value
@param string $message

@return void

@throws InvalidArgumentException
Assert that the value is scalar .