Problem/Motivation
Getting Following errors/warnings
$ phpcs --standard=Drupal tencentcloud_captcha
FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\js\actions.js
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
4 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
23 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
25 | ERROR | [x] Space found before semicolon; expected "return;" but found
| | "return ;"
33 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
36 | ERROR | [x] Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\js\prepare.js
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
9 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
11 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\src\Form\SettingsForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 439ms; Memory: 8MB
Proposed resolution
Fix the errors and warnings.
Comments
Comment #3
jay jangid commentedCreated MR , please review.
Thank you.
Comment #4
hardikpandya commentedComment #5
hardikpandya commentedI found phpcs issues for info.yml file and DI issues reported for the form. I have fixed them and committed the changes.
Comment #7
lugir commented