Fix the PHP_CodeSniffer issues reported by GitLab CI

Created on 13 May 2024, 7 months ago
Updated 20 June 2024, 6 months ago

Projects hosted on drupal.org can now enable GitLab CI, which (among other checks) allows to verify the code does not contain any PHP_CodeSniffer error/warning.

The first step is enabling GitLab CI for the project, and then verifying there are not PHP_CodeSniffer warnings/errors to fix, or fix them if there are.

The reported warnings/errors are the following ones.

FILE: ...es/custom/cookie_consent_notice_by_cookieyes-3446746/src/Form/BodyForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Core\Form\FormStateInterface.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 139ms; Memory: 6MB
📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇦🇺Australia VladimirAus Brisbane, Australia

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024