You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer I'd like to have the requirement for phpdoc for methods/variables in classes removed, so I don't have to add irrelevant doc blocks to my code.
Now that with the latest PHP versions it's possible to set return types and parameter types within the code, having them in the phpdoc as well is redundant and only adds noise. They should only be added if there is not just one type for these variables/methods or when more information is required in the phpdoc about the variable or method..
In the following situation, the doc blocks add nothing useful:
class Foobar extends BaseFoobar
{
private FoobarVariable $foobarVariable;
public function __construct(FoobarVariable $foobarVariable)
{
$this->foobarVariable = $foobarVariable;
}
public function someFunction(string $key, array $values): void
{
$foobarVariable = $this->foobarVariable;
// PHP magic is done here
}
}
Acceptance criteria
Phpdocs are no longer mandatory in the coding standards
The text was updated successfully, but these errors were encountered:
As a developer I'd like to have the requirement for phpdoc for methods/variables in classes removed, so I don't have to add irrelevant doc blocks to my code.
Now that with the latest PHP versions it's possible to set return types and parameter types within the code, having them in the phpdoc as well is redundant and only adds noise. They should only be added if there is not just one type for these variables/methods or when more information is required in the phpdoc about the variable or method..
In the following situation, the doc blocks add nothing useful:
Acceptance criteria
The text was updated successfully, but these errors were encountered: