Pinq\Expressions\ValueExpression::isValueType PHP Method

isValueType() public static method

Returns whether the supplied value is a value type.
public static isValueType ( mixed $value ) : boolean
$value mixed
return boolean
    public static function isValueType($value)
    {
        if (is_scalar($value) || $value === null) {
            return true;
        } elseif (is_array($value)) {
            $isScalar = true;
            array_walk_recursive($value, function ($value) use(&$isScalar) {
                if ($isScalar && !(is_scalar($value) || $value === null)) {
                    $isScalar = false;
                }
            });
            return $isScalar;
        } else {
            return false;
        }
    }