Fix the issues reported by phpcs

Created on 22 January 2024, 11 months ago
Updated 6 February 2024, 11 months ago

After setting the Gitlab CI configuration, I see a lot of issues reported by phpcs that need to be addressed:

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/timepicker-timepicker/

FILE: /websites/drupal10-2/web/modules/contrib/timepicker-timepicker/timepicker.module
------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------
   9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\Xss.
  19 | ERROR | [ ] Description for the @return value is missing
 134 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 142 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

Time: 152ms; Memory: 10MB
📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇨🇦Canada danrod Ottawa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024