src/Eloquent/Typhoon/Generator/ParameterListMerge/MergeTool.php
protected function mergeType(
        RuntimeConfiguration $configuration,
        ClassDefinition $classDefinition = null,
        MethodDefinition $methodDefinition,
        $parameterName,
        Type $documentedType,
        Type $nativeType
    ) {
        $this->typeCheck->mergeType(func_get_args());

        if (!$this->typeIsCompatible(
            $configuration,
            $documentedType,
            $nativeType
        )) {
            $this->handleError(new DocumentedParameterTypeMismatch(
                $classDefinition,
                $methodDefinition,
                $parameterName,
                $nativeType,
                $documentedType
            ));

            return $nativeType;
        }

        if (TypeEquivalenceComparator::equivalent($documentedType, $nativeType)) {
            return new NullifiedType($documentedType);
        }

        return $documentedType;
    }
protected function mergeType(
        RuntimeConfiguration $configuration,
        ClassDefinition $classDefinition = null,
        MethodDefinition $methodDefinition,
        $parameterName,
        Type $documentedType,
        Type $nativeType
    ) {
        $this->typeCheck->mergeType(func_get_args());

        if (!$this->typeIsCompatible(
            $configuration,
            $documentedType,
            $nativeType
        )) {
            $this->handleError(new DocumentedParameterTypeMismatch(
                $classDefinition,
                $methodDefinition,
                $parameterName,
                $nativeType,
                $documentedType
            ));

            return $nativeType;
        }

        if (TypeEquivalenceComparator::equivalent($documentedType, $nativeType)) {
            return new NullifiedType($documentedType);
        }

        return $documentedType;
    }
@param RuntimeConfiguration $configuration
@param ClassDefinition|null $classDefinition
@param MethodDefinition     $methodDefinition
@param string               $parameterName
@param Type                 $documentedType
@param Type                 $nativeType

@return Type