- Issue created by @bhaveshdas
- Issue was unassigned.
- Status changed to Needs review
4 months ago 6:39am 10 July 2024 - 🇮🇳India bhaveshdas
I have fixed all phpcs Issues could you please review it.
Thankyou !
- Assigned to mahyarss
- Status changed to Fixed
4 months ago 7:27am 10 July 2024 - 🇵🇱Poland mahyarss
Dear @bhaveshdas,
I appreciate your detailed report regarding the coding standards for the wowjs module. However, it appears that there are some inaccuracies in the report generated by PHPCS.
For reviewing coding standard issues for the module, it is essential to utilize the source code branch. The warnings to remove "project", "datestamp", and "version" from the wowjs.info.yml file are misleading, as these elements are not present in the source code and are automatically appended during the Drupal.org packaging process.
Additionally, the errors reported in the JavaScript file (wowjs.init.js) regarding the usage of true, false, and null are incorrect. In JavaScript, these values must be written in lowercase ("true", "false", "null"). Changing them to uppercase will result in execution errors. The suggested changes to capitalize these constants are incorrect and will cause functional issues.
Please refer to @apaderno response on Drupal.org regarding this issue:
JavaScript uses true, false, and null, written exactly like that. PHP_CodeSniffer applies PHP rules to JavaScript files, which is wrong. To verify which rules PHP_CodeSniffer uses, it is sufficient to run phpcs --standard=Drupal,DrupalPractice -s --extensions=js to notice that.
Generic.PHP.UpperCaseConstant.Found is a rule for PHP, not for JavaScript.
https://www.drupal.org/project/date_range_picker/issues/3370203#comment-15143723 📌 Fix the issue reported by phpcs Closed: won't fix
I recommend reviewing the branch source code for accurate results and disregarding the incorrect JavaScript errors.
Thank you for your attention to these details.
Best regards,
Mahyar SBT - Status changed to Fixed
4 months ago 7:40am 10 July 2024