src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php
public function setReturnType($php_type, $new_type, $phpdoc_type, $is_php_compatible, $description)
    {
        $new_type = str_replace(['<mixed, mixed>', '<array-key, mixed>', '<empty, empty>'], '', $new_type);

        $this->new_php_return_type = $php_type;
        $this->new_phpdoc_return_type = $phpdoc_type;
        $this->new_psalm_return_type = $new_type;
        $this->return_type_is_php_compatible = $is_php_compatible;
        $this->return_type_description = $description;
    }
public function setReturnType($php_type, $new_type, $phpdoc_type, $is_php_compatible, $description)
    {
        $new_type = str_replace(['<mixed, mixed>', '<array-key, mixed>', '<empty, empty>'], '', $new_type);

        $this->new_php_return_type = $php_type;
        $this->new_phpdoc_return_type = $phpdoc_type;
        $this->new_psalm_return_type = $new_type;
        $this->return_type_is_php_compatible = $is_php_compatible;
        $this->return_type_description = $description;
    }
public function setReturnType ( $ php_type , $ new_type , $ phpdoc_type , $ is_php_compatible , $ description ) { $ new_type = str_replace ( [ '<mixed, mixed>' , '<array-key, mixed>' , '<empty, empty>' ] , '' , $ new_type ) ; $ this -> new_php_return_type = $ php_type ; $ this -> new_phpdoc_return_type = $ phpdoc_type ; $ this -> new_psalm_return_type = $ new_type ; $ this -> return_type_is_php_compatible = $ is_php_compatible ; $ this -> return_type_description = $ description ; }
Sets the new return type

@param   ?string     $php_type
@param   string      $new_type
@param   string      $phpdoc_type
@param   bool        $is_php_compatible
@param   ?string     $description

@return  void
Sets the new return type