Skip to content

Library generates non-nullable return type for nullable return methods #482

Open
@jakublabno

Description

@jakublabno

Library version 3.0.0

For below method proxy is generating non-null return

/**
     * @AopAnnotation()
     * @return null|int
     */
    public function getSomeRandomValueAllowOnNull(): ?int
    {
        return random_int(0, 666);
    }

result:

/**
     * @AopAnnotation()
     * @return null|int
     */
    public function getSomeRandomValueAllowOnNull() : int
    {
        return self::$__joinPoints['method:getSomeRandomValueAllowOnNull']->__invoke($this);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions