Fix lint standards in CivicTheme

Created on 22 April 2025, 4 days ago

Problem/Motivation

A number of lint errors have crept back into the repository:

FILE: /app/web/themes/custom/civictheme/includes/automated_list.inc
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
 114 | ERROR | [x] Separate the @throws and @see sections by a blank line.
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: /app/web/themes/custom/civictheme/includes/paragraphs.inc
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
 104 | ERROR | [x] Parameter $image_style has null default value, but is not
     |       |     marked as nullable.
 114 | ERROR | [x] Parameter $image_style has null default value, but is not
     |       |     marked as nullable.
 242 | ERROR | [x] Parameter $bundle has null default value, but is not marked
     |       |     as nullable.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /app/web/themes/custom/civictheme/includes/banner.inc
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 76 | WARNING | Line exceeds 80 characters; contains 91 characters
----------------------------------------------------------------------


FILE: /app/web/themes/custom/civictheme/includes/page.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 73 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/themes/custom/civictheme/includes/utilities.inc
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 171 | ERROR | [x] Parameter $image_style has null default value, but is not
     |       |     marked as nullable.
 239 | ERROR | [x] Parameter $image_style has null default value, but is not
     |       |     marked as nullable.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /app/web/themes/custom/civictheme/includes/form_element.inc
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
 54 | WARNING | Line exceeds 80 characters; contains 90 characters
 55 | WARNING | Line exceeds 80 characters; contains 90 characters
 56 | WARNING | Line exceeds 80 characters; contains 90 characters
 57 | WARNING | Line exceeds 80 characters; contains 90 characters
 58 | WARNING | Line exceeds 80 characters; contains 90 characters
 59 | WARNING | Line exceeds 80 characters; contains 90 characters
----------------------------------------------------------------------


FILE: /app/web/themes/custom/civictheme/civictheme.post_update.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 639 | ERROR | [x] Expected 1 space after cast statement; 0 found
 743 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced
     |       |     with use statements
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /app/web/themes/custom/civictheme/theme-settings.provision.inc
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 253 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2
     |       |     spaces
 437 | ERROR | [x] Parameter $uuid has null default value, but is not marked as
     |       |     nullable.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /app/web/themes/custom/civictheme/src/CivicthemePluginLoader.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 48 | ERROR | [x] Parameter $parent_class has null default value, but is not
    |       |     marked as nullable.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.10

Component

Code

Created by

🇦🇺Australia RichardGaunt Melbourne

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

Comments & Activities

Production build 0.71.5 2024