magento-coding-standard
magento-coding-standard copied to clipboard
Magento Coding Standard
When I use parse_url() function - phpcs shows me the following error: ``` 39 | WARNING | The use of function parse_url() is discouraged ``` Is there any reason why...
### Description I have a couple of wrong passes of the rule ```diff - $date = new \DateTime($date); - $now = new \DateTime(); + $date = new \DateTime('now'); + $now...
### Preconditions 1. Use any version of the magento coding standard ### Steps to reproduce 1. Try to use the `--exclude` flag on the CLI to exclude a magento sniff...
### Preconditions This started happening after upgrading the coding-standard library from version 6 to version 10 on a custom module of mine. I suspect that this library currently can't deal...
This PR improves special annotation detection of the `Magento2.Security.XssTemplate` sniff by adding `T_SEMICOLON` as a statement separator. This resolves the issue that violations in a statement might be ignored by...
This PR resolves the issue that in the `Magento2.Security.XssTemplate` sniff `FoundUnescaped` violations are sometimes incorrectly reported as `FoundNotAllowed`. This currently happens from the moment the first `FoundNotAllowed` is reported, after...
This is a small part of https://github.com/magento/magento-coding-standard/pull/347 as suggested in https://github.com/magento/magento-coding-standard/pull/347#issuecomment-999512251. https://eslint.org/docs/rules/comma-dangle Including a trailing comma when the closing `]` or `}` is on a different line means that it's...
This is a small part of https://github.com/magento/magento-coding-standard/pull/347 as suggested in https://github.com/magento/magento-coding-standard/pull/347#issuecomment-999512251. https://eslint.org/docs/rules/no-useless-call https://eslint.org/docs/rules/no-useless-computed-key https://eslint.org/docs/rules/no-useless-constructor https://eslint.org/docs/rules/no-useless-escape https://eslint.org/docs/rules/no-useless-rename https://eslint.org/docs/rules/no-useless-return
This is a small part of https://github.com/magento/magento-coding-standard/pull/347 as suggested in https://github.com/magento/magento-coding-standard/pull/347#issuecomment-999512251. https://eslint.org/docs/rules/no-multiple-empty-lines
This is a small part of https://github.com/magento/magento-coding-standard/pull/347 as suggested in https://github.com/magento/magento-coding-standard/pull/347#issuecomment-999512251. https://eslint.org/docs/rules/no-global-assign