framework icon indicating copy to clipboard operation
framework copied to clipboard

[FIX] Library generates non-nullable return type for nullable return …

Open jakublabno opened this issue 3 years ago • 1 comments

Library generates non-nullable return type for nullable return methods #482 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);
    }

jakublabno avatar Apr 19 '22 14:04 jakublabno

A new inspection was created.

scrutinizer-notifier avatar Apr 19 '22 14:04 scrutinizer-notifier

Thanks!

lisachenko avatar Feb 07 '24 09:02 lisachenko