protected function getTypeOf($value): string
    {
        $type = gettype($value);

        switch ($type) {
            case 'integer':
            case 'boolean':
            case 'string':
                return $type;
            case 'double':
                return 'float';
            case 'array':
                return count(array_filter(array_keys($value), 'is_string')) > 0 ? 'assoc' : 'array';
            case 'object':
                return $value instanceof Traversable ? 'array' :
                    ($value instanceof DateTime ? DateTime::class : 'object');
            default:
                return $type;
        }
    }
protected function getTypeOf($value): string
    {
        $type = gettype($value);

        switch ($type) {
            case 'integer':
            case 'boolean':
            case 'string':
                return $type;
            case 'double':
                return 'float';
            case 'array':
                return count(array_filter(array_keys($value), 'is_string')) > 0 ? 'assoc' : 'array';
            case 'object':
                return $value instanceof Traversable ? 'array' :
                    ($value instanceof DateTime ? DateTime::class : 'object');
            default:
                return $type;
        }
    }
protected function getTypeOf ( $ value ) : string { $ type = gettype ( $ value ) ; switch ( $ type ) { case 'integer' : case 'boolean' : case 'string' : return $ type ; case 'double' : return 'float' ; case 'array' : return count ( array_filter ( array_keys ( $ value ) , 'is_string' ) ) > 0 ? 'assoc' : 'array' ; case 'object' : return $ value instanceof Traversable ? 'array' : ( $ value instanceof DateTime ? DateTime :: class : 'object' ) ; default : return $ type ; } }
Get the type of a value

@return string
Get the type of a value