Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant phpdocs for methods and variables #17

Open
1 task
ArjenMiedema opened this issue May 27, 2021 · 1 comment
Open
1 task

Remove redundant phpdocs for methods and variables #17

ArjenMiedema opened this issue May 27, 2021 · 1 comment

Comments

@ArjenMiedema
Copy link

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
@leonhelmus
Copy link
Contributor

@ArjenMiedema I believe this is resolved in the new testing suite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants