- Issue created by @Rohit Rana
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 5:59am 11 August 2023 - Open on Drupal.org →Core: 10.0.7 + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - 🇩🇰Denmark osman Copenhagen
Hi Rahit,
Are you positive you're running PHPCS with `Drupal`, and `DrupalPractice` coding-standards loaded? AFAIK, JavaScript boolean values should be lowercase, but for PHP it should be uppercase.
You can check the installed standards via `phpcs -i`
Because this is what I get:
osman@drupal-web:/var/www/html$ vendor/bin/phpcs web/modules/contrib/lazy FILE: /var/www/html/web/modules/contrib/lazy/lazy.module ------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------ 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FormatterInterface. ------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------ FILE: /var/www/html/web/modules/contrib/lazy/src/Form/LazyForm.php --------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------------- 17 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Extension\ModuleHandlerInterface. --------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------- Time: 203ms; Memory: 10MB osman@drupal-web:/var/www/html$ vendor/bin/phpcs -i The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, Drupal, DrupalPractice, VariableAnalysis and SlevomatCodingStandard
- First commit to issue fork.
- Open on Drupal.org →Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7last update
7 months ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7last update
7 months ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7last update
7 months ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7last update
7 months ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7last update
7 months ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7last update
7 months ago Waiting for branch to pass - Status changed to RTBC
7 months ago 6:24am 17 May 2024 - 🇩🇰Denmark osman Copenhagen
* Drupal 8
* PHP 7.4
* PHPCS 3.10.1 (stable)Before:
osman@drupal8-web:/var/www/html$ ./vendor/bin/phpcs -s -p --standard=Drupal web/modules/lazy/ ..E..E.... 10 / 10 (100%) FILE: /var/www/html/web/modules/lazy/js/lazy.js --------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------- 27 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true" (Generic.PHP.UpperCaseConstant.Found) --------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------- FILE: /var/www/html/web/modules/lazy/src/Form/LazyForm.php ------------------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------ 17 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Extension\ModuleHandlerInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) ------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------ Time: 294ms; Memory: 8MB
After:
osman@drupal8-web:/var/www/html$ ./vendor/bin/phpcs -s -p --standard=Drupal web/modules/lazy/ .......... 10 / 10 (100%) Time: 984ms; Memory: 8MB
- Status changed to Fixed
6 months ago 2:19pm 6 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.