Fix issues reported by PHPCS

Created on 25 February 2025, 13 days ago

Problem/Motivation

It would be great to address the below minor PHPCS issues :

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml views_timelinejs/

FILE: /var/www/web/modules/contrib/views_timelinejs/src/TimelineJS/Era.php
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
 41 | ERROR | [x] Parameter $text has null default value, but is not marked as nullable.
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/views_timelinejs/src/TimelineJS/Date.php
---------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
 29 | ERROR | [x] Parameter $timezone has null default value, but is not marked as nullable.
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/views_timelinejs/src/TimelineJS/Slide.php
---------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
 83 | ERROR | [x] Parameter $end_date has null default value, but is not marked as nullable.
 83 | ERROR | [x] Parameter $text has null default value, but is not marked as nullable.
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/views_timelinejs/src/TimelineJS/TitleSlide.php
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
 16 | ERROR | [x] Parameter $text has null default value, but is not marked as nullable.
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------

Time: 654ms; Memory: 14MB

Steps to reproduce

  • Install the theme, composer require 'drupal/views_timelinejs:^4.1'
  • Run the command,

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml views_timelinejs/

Proposed resolution

Fix the PHPCS issues.

📌 Task
Status

Active

Version

4.1

Component

Code

Created by

🇮🇳India abhiyanshu

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024