protected function buildInstanceType(Definition $type, $serviceId, $tagName)
    {
        $parents = class_parents($type->getClass());
        $args = $type->getArguments();
        $ref = new \ReflectionClass($type);

        if (\in_array(AbstractSimpleType::class, $parents, true)
                && (0 === \count($args) || (1 === \count($args) && \is_string($args[0])))) {
            return $ref->newInstanceArgs($args);
        }

        throw new InvalidConfigurationException(sprintf('The service id "%s" must have the "class" parameter in the "%s" tag.', $serviceId, $tagName));
    }
protected function buildInstanceType(Definition $type, $serviceId, $tagName)
    {
        $parents = class_parents($type->getClass());
        $args = $type->getArguments();
        $ref = new \ReflectionClass($type);

        if (\in_array(AbstractSimpleType::class, $parents, true)
                && (0 === \count($args) || (1 === \count($args) && \is_string($args[0])))) {
            return $ref->newInstanceArgs($args);
        }

        throw new InvalidConfigurationException(sprintf('The service id "%s" must have the "class" parameter in the "%s" tag.', $serviceId, $tagName));
    }
protected function buildInstanceType ( Definition $ type , $ serviceId , $ tagName ) { $ parents = class_parents ( $ type -> getClass ( ) ) ; $ args = $ type -> getArguments ( ) ; $ ref = new \ ReflectionClass ( $ type ) ; if ( \ in_array ( AbstractSimpleType :: class , $ parents , true ) && ( 0 === \ count ( $ args ) || ( 1 === \ count ( $ args ) && \ is_string ( $ args [ 0 ] ) ) ) ) { return $ ref -> newInstanceArgs ( $ args ) ; } throw new InvalidConfigurationException ( sprintf ( 'The service id "%s" must have the "class" parameter in the "%s" tag.' , $ serviceId , $ tagName ) ) ; }
Build the simple default type instance.

@param Definition $type      The definition of default value type
@param string     $serviceId The service id of default value type
@param string     $tagName   The tag name

@return ObjectTypeInterface
Build the simple default type instance .