Skip to content

Conversation

@mspirkov
Copy link
Contributor

@mspirkov mspirkov commented Nov 11, 2025

Q A
Is bugfix? ✔️/❌
New feature? ✔️
Breaks BC? ✔️/❌
Fixed issues

Before

image image image image

After

image image image image

return '<span class="signature-defs">' . implode(' ', $definition) . '</span> '
. '<span class="signature-type">' . ($method->isReturnByReference ? '<b>&</b>' : '')
. ($method->returnType === null ? 'void' : $this->createTypeLink($method->returnTypes, $context)) . '</span> '
. $this->createTypeLink($method->returnTypes, $context) . '</span> '
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now there's always a type in this place.

@mspirkov mspirkov marked this pull request as ready for review November 11, 2025 12:25
@mspirkov
Copy link
Contributor Author

After these changes, we should explicitly specify return types everywhere in Yii2, because void will change to mixed everywhere where the type was not specified.
I believe that this solution would be the most appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant