phpcs Drupal standards

Created on 28 July 2020, over 4 years ago
Updated 20 July 2024, 5 months ago

Problem/Motivation

FILE: /calendar/calendar.theme.inc
----------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------
  52 | WARNING | Unused variable $hour.
 103 | WARNING | Unused variable $year.
 562 | WARNING | Unused variable $first_column_width.
 640 | WARNING | Unused variable $count.
 641 | WARNING | Unused variable $ids.
 757 | WARNING | Unused variable $term_colors.
 758 | WARNING | Unused variable $field_name.
 813 | WARNING | Unused variable $index.
----------------------------------------------------------------------


FILE: /calendar/calendar.routing.yml
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
 7 | WARNING | The administration page callback should probably use "administer site configuration" - which implies
   |         | the user can change something - rather than "access administration pages" which is about viewing but
   |         | not changing configurations.
--------------------------------------------------------------------------------------------------------------------


FILE: /calendar/calendar.module
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
--------------------------------------------------------------------------------------
  12 | WARNING | Global constants should not be used, move it to a class or interface
  13 | WARNING | Global constants should not be used, move it to a class or interface
  14 | WARNING | Global constants should not be used, move it to a class or interface
  33 | WARNING | Unused variable $style_options.
  74 | WARNING | Unused variable $id.
 234 | WARNING | There must be no blank line following an inline comment
 239 | WARNING | Unused variable $type.
--------------------------------------------------------------------------------------


FILE: /calendar/calendar_datetime/calendar_datetime.info.yml
----------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------
 1 | WARNING | "core_version_requirement" property is missing in the info.yml file
----------------------------------------------------------------------------------------


FILE: /calendar/src/CalendarHelper.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
  91 | WARNING | Unused variable $types.
 415 | WARNING | Unused variable $cid.
 496 | WARNING | Variable $field is undefined.
 496 | WARNING | Variable $field is undefined.
 591 | WARNING | Unused variable $start.
 746 | WARNING | Unused variable $name.
 995 | WARNING | Unused variable $name.
----------------------------------------------------------------------


FILE: /calendar/src/Plugin/Derivative/ViewsFieldTemplate.php
----------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------
 110 | WARNING | Unused variable $key.
----------------------------------------------------------------------------------------


FILE: /calendar/src/Plugin/views/style/Calendar.php
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------------
  604 | WARNING | Unused variable $item_end.
 1161 | WARNING | Unused variable $key.
 1304 | WARNING | Variable $entry is undefined.
 1344 | WARNING | Unused variable $time.
-------------------------------------------------------------------------------


FILE: /calendar/src/Plugin/views/row/Calendar.php
-----------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------
 448 | WARNING | Unused variable $increment.
 474 | WARNING | Unused variable $event_date_value.
 572 | WARNING | Unused variable $dateInfo.
 627 | WARNING | Unused variable $calendar_end.
-----------------------------------------------------------------------------


FILE: /calendar/src/Plugin/views/pager/CalendarPager.php
------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------
 98 | WARNING | Unused variable $name.
------------------------------------------------------------------------------------


FILE: /calendar/src/CalendarDateInfo.php
------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------
 58 | WARNING | There must be no blank line following an inline comment
------------------------------------------------------------------------
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India harishh

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024