Fix PHP Coding standards

Created on 7 June 2024, 6 months ago
Updated 21 June 2024, 6 months ago

Problem/Motivation

FILE: ...les/custom/datetime_now/src/ElementInfoAlter/ElementInfoAlterInterface.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin
   |       |     with a file doc comment
   |       |     (Drupal.Commenting.FileComment.NamespaceNoFileDoc)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ules/custom/datetime_now/src/ElementInfoAlter/DatetimeElementInfoAlter.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin
    |       |     with a file doc comment
    |       |     (Drupal.Commenting.FileComment.NamespaceNoFileDoc)
 13 | ERROR | [x] Missing class doc comment
    |       |     (Drupal.Commenting.ClassComment.Missing)
 29 | ERROR | [x] No space found before comment text; expected "//
    |       |     $element['#theme_wrappers'] = ['container'];" but found
    |       |     "//$element['#theme_wrappers'] = ['container'];"
    |       |     (Drupal.Commenting.InlineComment.NoSpaceBefore)
 46 | ERROR | [x] Expected 1 blank line after function; 0 found
    |       |     (Squiz.WhiteSpace.FunctionSpacing.AfterLast)
 47 | ERROR | [x] The closing brace for the class must have an empty line
    |       |     before it
    |       |     (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...s/project/datetime_now/web/modules/custom/datetime_now/datetime_now.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
   |       |     (Drupal.Commenting.FileComment.Missing)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 107ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...ime_now/web/modules/custom/datetime_now/datetime_now.module  1       0
...etime_now/src/ElementInfoAlter/DatetimeElementInfoAlter.php  5       0
...time_now/src/ElementInfoAlter/ElementInfoAlterInterface.php  1       0
--------------------------------------------------------------------------------
A TOTAL OF 7 ERRORS AND 0 WARNINGS WERE FOUND IN 3 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 7 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
----------------------------------------------------------------------
    SOURCE                                                       COUNT
----------------------------------------------------------------------
[x] Drupal.Commenting.FileComment.NamespaceNoFileDoc             2
[x] Drupal.Classes.ClassDeclaration.CloseBraceAfterBody          1
[x] Drupal.Commenting.ClassComment.Missing                       1
[x] Drupal.Commenting.FileComment.Missing                        1
[x] Drupal.Commenting.InlineComment.NoSpaceBefore                1
[x] Squiz.WhiteSpace.FunctionSpacing.AfterLast                   1
----------------------------------------------------------------------
A TOTAL OF 7 SNIFF VIOLATIONS WERE FOUND IN 6 SOURCES
----------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SOURCES AUTOMATICALLY (7 VIOLATIONS IN TOTAL)
----------------------------------------------------------------------

Steps to reproduce

https://git.drupalcode.org/project/datetime_now/-/jobs/1806922

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States generalredneck

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