Page MenuHomePhabricator

Should function without parameter but with return statements require documentation with codesniffer?
Open, Needs TriagePublic

Description

The codesniffer sniff FunctionCommentSniff does not emit warnings (MissingDocumentationPublic, MissingDocumentationProtected, MissingDocumentationPrivate) when a function has no parameters or is not a getter. But what about function with a return value but not named get*?

Should this function does not require documentation of the return value?

If T258925: Do not warn about missing function doc comment when parameter and return types are fully specified by type hints get fixed a possible return type hint should not require documentation.