Fix code style errors

Created on 20 December 2024, 5 days ago

Problem/Motivation

Pipelines should be green: https://git.drupalcode.org/project/ohdear_integration/-/pipelines

$ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
FILE: ...hdear_integration/web/modules/custom/ohdear_integration/src/OhDearInfo.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 77 | ERROR | [x] Parameter $siteId has null default value, but is not marked
    |       |     as nullable.
    |       |     (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing)
 77 | ERROR | [x] Parameter $from has null default value, but is not marked as
    |       |     nullable.
    |       |     (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing)
 77 | ERROR | [x] Parameter $to has null default value, but is not marked as
    |       |     nullable.
    |       |     (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing)
 94 | ERROR | [x] Parameter $siteId has null default value, but is not marked
    |       |     as nullable.
    |       |     (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 301ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...on/web/modules/custom/ohdear_integration/src/OhDearInfo.php  4       0
--------------------------------------------------------------------------------
A TOTAL OF 4 ERRORS AND 0 WARNINGS WERE FOUND IN 10 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 4 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
--------------------------------------------------------------------------------
    SOURCE                                                                 COUNT
--------------------------------------------------------------------------------
[x] SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.Null  4
--------------------------------------------------------------------------------
A TOTAL OF 4 SNIFF VIOLATIONS WERE FOUND IN 1 SOURCE
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SOURCES AUTOMATICALLY (4 VIOLATIONS IN TOTAL)
--------------------------------------------------------------------------------
📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇸🇮Slovenia useernamee Ljubljana

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