Fix phpcs code-standard violations

Created on 19 December 2023, 6 months ago
Updated 16 January 2024, 5 months ago

Problem/motivation

phpcs reports the following errors

FILE: tests/src/FunctionalJavascript/PermissionTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Core\Field\Entity\BaseFieldOverride.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: tests/src/Functional/EntityTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first
   |       |     wrong one is Drupal\Tests\BrowserTestBase.
   |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: page_title_visibility.module
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
  6 | ERROR | [x] There must be exactly one blank line after the file
    |       |     comment
    |       |     (Drupal.Commenting.FileComment.SpacingAfterComment)
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first
    |       |     wrong one is Drupal\Core\Form\FormStateInterface.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)

Proposed resolution

Sort use statements alphabetically. Add blank line as noted.

This module uses Gitlab CI for automated testing of proposed code changes. To contribute code changes, create a merge request. Patch files will not trigger automated testing and are not sufficient for review.
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States daddison

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024