Fix PHPCS NullabilityTypeMissing

Created on 6 January 2025, 6 months ago

Problem/Motivation

Current pipeline phpcs errors:

FILE: ...y/web/modules/custom/section_library/src/Form/AddTemplateToLibraryForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 103 | ERROR | [x] Parameter $section_storage has null default value, but is
     |       |     not marked as nullable.
     |       |     (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ry/web/modules/custom/section_library/src/Form/AddSectionToLibraryForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 103 | ERROR | [x] Parameter $section_storage has null default value, but is
     |       |     not marked as nullable.
     |       |     (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 231ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...custom/section_library/src/Form/AddSectionToLibraryForm.php  1       0
...ustom/section_library/src/Form/AddTemplateToLibraryForm.php  1       0
--------------------------------------------------------------------------------
A TOTAL OF 2 ERRORS AND 0 WARNINGS WERE FOUND IN 16 FILES
πŸ› Bug report
Status

Active

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jastraat

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