Fix coding standards

Created on 6 February 2023, almost 2 years ago
Updated 24 February 2023, almost 2 years ago

Problem/Motivation

Scanning the module with the latest version of coder reveals some coding standards issues:

FILE: /var/www/html/web/modules/contrib/job_scheduler/job_scheduler.module
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 27 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 53 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/job_scheduler/src/JobScheduler.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 89 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/job_scheduler/src/Plugin/Derivative/JobSchedulerQueueWorker.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
 29 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/contrib/job_scheduler/src/JobSchedulerCronTab.php
---------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------
  80 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 316 | ERROR | [x] list(...) is forbidden, use [...] instead.
 336 | ERROR | [x] list(...) is forbidden, use [...] instead.
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------

MR incoming.

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇯🇵Japan ptmkenny

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

Comments & Activities

Production build 0.71.5 2024