mask_export icon indicating copy to clipboard operation
mask_export copied to clipboard

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

Open simonschaufi opened this issue 3 years ago • 4 comments

simonschaufi avatar Apr 07 '22 14:04 simonschaufi

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?

IchHabRecht avatar May 22 '22 22:05 IchHabRecht

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

simonschaufi avatar May 22 '22 23:05 simonschaufi

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.

IchHabRecht avatar May 23 '22 04:05 IchHabRecht