magento / magento-coding-standard

Magento Coding Standard
Open Software License 3.0
343 stars 153 forks source link

Member variables and methods should not require DocBlock when properly typed #476

Open JacobBrownAustin opened 9 months ago

JacobBrownAustin commented 9 months ago

https://wiki.corp.adobe.com/pages/viewpage.action?spaceKey=MC&title=Proposal+to+change+magento-coding-standard+to+not+require+DocBlock+when+parameters+defined

fredden commented 9 months ago

@JacobBrownAustin thanks for raising this. Please can you add some tests to cover the changes being introduced here. I don't know why the automated test runs failed in GitHub Actions; do the tests run successfully on your system?

JacobBrownAustin commented 9 months ago

Yeah; I'm working on updating tests now.

fredden commented 9 months ago

https://wiki.corp.adobe.com/pages/viewpage.action?spaceKey=MC&title=Proposal+to+change+magento-coding-standard+to+not+require+DocBlock+when+parameters+defined

This URL doesn't work for me. Is this an internal reference within Adobe? What does this page say?

JacobBrownAustin commented 9 months ago

Yeah I'll update the details if this to include the info from that page. Basically, I proposed that we shouldn't need superfluous DockBlock for property or method if the type is already defined. It's also solving a separate issue I found more recently that readonly properties fail even when they have proper DockBlock.

fredden commented 9 months ago

There we're a lot of changes in PHP_CodeSniffer v3.8.0 related to readonly. It's possible that the bug you mention in passing here has already been solved. Perhaps you could open an issue here so that can be discussed/investigated.

fredden commented 9 months ago

See also #406