I would not use PHPDoc for this method here. when you declared the $arg type and return type, it's self-explanatory and any modern IDE can catch that, PHPDoc here just makes unnecessarily noisy.
If you add a return type to create method via either PHPDoc or method itself, $type = type::create($arg); prop comments is unnecessary.
I find PHPDoc to be too aggressive when it comes to prop comments.
In my opinion it would be against the DRY principle to have both propdoc and docblock. Specially, specially, when also typehinting the method.
I mean that something like this is a no-no for me.
I would not use PHPDoc for this method here. when you declared the $arg type and return type, it's self-explanatory and any modern IDE can catch that, PHPDoc here just makes unnecessarily noisy.
If you add a return type to
create
method via either PHPDoc or method itself,$type = type::create($arg);
prop comments is unnecessary.Exactly my point.
And mixing use cases when and when not to include phpdoc syntax is even worse: It removes the whole concept of code style when it's not even followed.