- 🇨🇭Switzerland berdir Switzerland
Needs to be a merge request now.
I think the chances of subclasses deciding to return false are near zero, and even if they would, it wouldn't break anything, so lets keep it at null|array.
AliasStorageHelperInterface::loadBySource() has annotated return type "@return bool|array".
AliasStorageHelper::loadBySource() has actual return type null|array.
One of them is wrong.
I prefer NULL.
Change the doc comment to "array|null".
OR
Change it to "array|null|false" because 3rd party / custom implementations might already be returning false.
Side quest:
Explicit return NULL in AliasStorageHelper, instead of the implicit void = null.
Other implementations are now encouraged to also return NULL.
Calling code should check for NULL instead of FALSE.
OR
Calling code should check anything empty-ish because older implementations might still return FALSE.
Needs work
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Needs to be a merge request now.
I think the chances of subclasses deciding to return false are near zero, and even if they would, it wouldn't break anything, so lets keep it at null|array.