Library/ClassMethod.php
public function isReturnTypesHintDetermined()
    {
        if (0 == \count($this->returnTypes) || $this->isVoid()) {
            return false;
        }

        foreach ($this->returnTypes as $returnType => $definition) {
            switch ($returnType) {
                case 'variable':
                case 'callable':
                case 'resource':
                    return false;
            }

            if (isset($definition['type']) && 'return-type-annotation' === $definition['type']) {
                if ($this->areReturnTypesBoolCompatible() ||
                    $this->areReturnTypesDoubleCompatible() ||
                    $this->areReturnTypesIntCompatible() ||
                    $this->areReturnTypesNullCompatible() ||
                    $this->areReturnTypesStringCompatible() ||
                    \array_key_exists('array', $this->getReturnTypes())
                ) {
                    continue;
                }

                /*
                 * @todo Probable we should detect return type more more carefully.
                 * It is hard to process return type from the annotations at this time.
                 * Thus we just return false here.
                 */
                return false;
            }
        }

        return true;
    }
public function isReturnTypesHintDetermined()
    {
        if (0 == \count($this->returnTypes) || $this->isVoid()) {
            return false;
        }

        foreach ($this->returnTypes as $returnType => $definition) {
            switch ($returnType) {
                case 'variable':
                case 'callable':
                case 'resource':
                    return false;
            }

            if (isset($definition['type']) && 'return-type-annotation' === $definition['type']) {
                if ($this->areReturnTypesBoolCompatible() ||
                    $this->areReturnTypesDoubleCompatible() ||
                    $this->areReturnTypesIntCompatible() ||
                    $this->areReturnTypesNullCompatible() ||
                    $this->areReturnTypesStringCompatible() ||
                    \array_key_exists('array', $this->getReturnTypes())
                ) {
                    continue;
                }

                /*
                 * @todo Probable we should detect return type more more carefully.
                 * It is hard to process return type from the annotations at this time.
                 * Thus we just return false here.
                 */
                return false;
            }
        }

        return true;
    }
public function isReturnTypesHintDetermined ( ) { if ( 0 == \ count ( $ this -> returnTypes ) || $ this -> isVoid ( ) ) { return false ; } foreach ( $ this -> returnTypes as $ returnType => $ definition ) { switch ( $ returnType ) { case 'variable' : case 'callable' : case 'resource' : return false ; } if ( isset ( $ definition [ 'type' ] ) && 'return-type-annotation' === $ definition [ 'type' ] ) { if ( $ this -> areReturnTypesBoolCompatible ( ) || $ this -> areReturnTypesDoubleCompatible ( ) || $ this -> areReturnTypesIntCompatible ( ) || $ this -> areReturnTypesNullCompatible ( ) || $ this -> areReturnTypesStringCompatible ( ) || \ array_key_exists ( 'array' , $ this -> getReturnTypes ( ) ) ) { continue ; } /*
                 * @todo Probable we should detect return type more more carefully.
                 * It is hard to process return type from the annotations at this time.
                 * Thus we just return false here.
                 */ return false ; } } return true ; }
Is method have determined return type hint.

This method is used to generate:

- ZEND_BEGIN_ARG_INFO_EX
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX

Examples:

- FALSE: function foo() -> void;
- TRUE: function foo() -> null;
- TRUE: function foo() -> bool|string|..;
- TRUE: function foo() -> <\stdClass>;
- FALSE: function foo();
- FALSE: function foo() -> var;
- FALSE: function foo() -> resource|callable;

@return bool
Is method have determined return type hint .