magento-coding-standard
magento-coding-standard copied to clipboard
Member variables and methods should not require DocBlock when properly typed
https://wiki.corp.adobe.com/pages/viewpage.action?spaceKey=MC&title=Proposal+to+change+magento-coding-standard+to+not+require+DocBlock+when+parameters+defined
@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?
Yeah; I'm working on updating tests now.
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?
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.
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.
See also #406