Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Add return types, parameter types and clean up doc comments #188

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simonschaufi
Copy link
Contributor

No description provided.

@simonschaufi simonschaufi force-pushed the doctype-return-types branch 2 times, most recently from 7db03e9 to 35c0055 Compare April 19, 2022 11:56
@IchHabRecht
Copy link
Owner

Hi @simonschaufi,
Thank you very much for your pull request. Would you mind to give a short explanation why this pull request is necessary and what it resolved and/or improves?

@simonschaufi
Copy link
Contributor Author

simonschaufi commented May 22, 2022

PHP annotations don't inform the developer if you pass a wrong data type into a function, for example, while parameter types declare which strict data type is expected and must be returned. If input or output doesn't match, a fatal error will happen, which in the end tells the developer that he did something wrong. This improves the code and fewer mistakes will happen when refactoring the code at some point in the future.

The core does the same thing for v12: https://forge.typo3.org/issues/97210

@IchHabRecht
Copy link
Owner

Hi @simonschaufi,
Thanks again for this patch. As it seems not to be critical, I'll have a look as soon as I'm on this extension again.

@simonschaufi
Copy link
Contributor Author

it seams this extension is dead

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.

2 participants