private function addReturnType(): void
    {
        $file = $this->getFile();
        $returnTypeHint = $this->createReturnType();

        $file->fixer->beginChangeset();

        if ($this->isCustomArrayType($returnTypeHint)) {
            $returnTypeHint = ($returnTypeHint[0] === '?' ? '?' : '') . 'array';
        }

        $file->fixer->addContent(
            $this->token['parenthesis_closer'],
            ': ' . $returnTypeHint
        );

        $file->fixer->endChangeset();
    }