protected function assertType(string $class, string $param, ?\ReflectionType $reflType): void
    {
        if ($reflType === null || !$reflType instanceof \ReflectionNamedType) {
            throw new AutowireException("Unable to autowire {$class}: Unknown type for parameter '{$param}'.");
        }

        if ($reflType->isBuiltin()) {
            throw new AutowireException("Unable to autowire {$class}: "
                . "Build-in type '" . $reflType->getName() . "' for parameter '{$param}' can't be used as container "
                . "id. Please use annotations.");
        }
    }
protected function assertType(string $class, string $param, ?\ReflectionType $reflType): void
    {
        if ($reflType === null || !$reflType instanceof \ReflectionNamedType) {
            throw new AutowireException("Unable to autowire {$class}: Unknown type for parameter '{$param}'.");
        }

        if ($reflType->isBuiltin()) {
            throw new AutowireException("Unable to autowire {$class}: "
                . "Build-in type '" . $reflType->getName() . "' for parameter '{$param}' can't be used as container "
                . "id. Please use annotations.");
        }
    }
protected function assertType ( string $ class , string $ param , ? \ ReflectionType $ reflType ) : void { if ( $ reflType === null || ! $ reflType instanceof \ ReflectionNamedType ) { throw new AutowireException ( "Unable to autowire {$class}: Unknown type for parameter '{$param}'." ) ; } if ( $ reflType -> isBuiltin ( ) ) { throw new AutowireException ( "Unable to autowire {$class}: " . "Build-in type '" . $ reflType -> getName ( ) . "' for parameter '{$param}' can't be used as container " . "id. Please use annotations." ) ; } }
Assert that type can be used as container id.

@param string               $class
@param string               $param
@param \ReflectionType|null $reflType
@return void
@throws AutowireException
Assert that type can be used as container id .