DEV Community

Discussion on: What i like on PHP 7.4

Collapse
 
catalinionut profile image
Catalin Ionut Titov

Why do you still use doc block if every property including the return type is type hinted? It's redudant.

Collapse
 
maymeow profile image
May Meow • Edited

They are rewritten functions (i used 7.3 before)... but sometimes i have to use them for example if my return type is Array of something.... i cant return function xy() : User[] but only function xy(): array so i add @return array|User[] to docblock...

PS: and PhpStorm returns me errors when definition in docblock is missing... (i have to configure it to do not doing it)