Drupal Coding Standard is not matched

Created on 5 September 2024, 4 months ago

Problem/Motivation

FILE: calendar_view\calendar_view.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

FILE: calendar_view\calendar_view.theme.inc
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
197 | ERROR | [x] Expected 1 space after "=>"; 2 found
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

FILE: calendar_view\modules\calendar_view_demo\calendar_view_demo.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

FILE: calendar_view\modules\calendar_view_multiday\calendar_view_multiday.info.yml
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
----------------------------------------------------------------------------------------------------------------

FILE: calendar_view_multiday\calendar_view_multiday.module
--------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
34 | ERROR | [x] Expected newline after closing brace
36 | ERROR | [x] Expected newline after closing brace
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------

FILE: calendar_view\src\Plugin\views\filter\CalendarViewTimestamp.php
---------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------
27 | ERROR | [x] Expected newline after closing brace
28 | ERROR | [x] Space found after square bracket; expected "[$identifier" but found "[
| | $identifier"
35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
43 | WARNING | [ ] Empty return statement not required here
51 | ERROR | [x] Expected 1 blank line after function; 0 found
52 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: calendar_view\src\Plugin\views\pager\CalendarViewMonthPager.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
29 | ERROR | String concat is not required here; use a single string instead
---------------------------------------------------------------------------------------------------

FILE: calendar_view\src\Plugin\views\pager\CalendarViewWeekPager.php
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
29 | ERROR | String concat is not required here; use a single string instead
--------------------------------------------------------------------------------------------------

FILE: calendar_view\src\Plugin\views\style\CalendarViewBase.php
----------------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AND 3 WARNINGS AFFECTING 19 LINES
----------------------------------------------------------------------------------------------------------
75 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
202 | ERROR | [x] Separate the @param and @return sections by a blank line.
225 | ERROR | [ ] Description for the @return value must be on the next line
274 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
302 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
304 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
314 | ERROR | [x] Expected 1 space after "="; 2 found
489 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
490 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
515 | ERROR | [x] Expected newline after closing brace
518 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
581 | ERROR | [x] Expected 1 blank line after function; 2 found
661 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
674 | ERROR | [ ] Parameter $row is not described in comment
677 | ERROR | [ ] Doc comment for parameter $result does not match actual variable name $field
745 | ERROR | [ ] Parameter $values is not described in comment
750 | ERROR | [ ] Doc comment for parameter $row_timestamp does not match actual variable name $values
856 | ERROR | [x] Expected 1 blank line after function; 0 found
857 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------

FILE: calendar_view\src\Plugin\views\style\CalendarViewMonth.php
----------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
172 | ERROR | [x] Expected 1 blank line after function; 0 found
173 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: calendar_view\tests\modules\calendar_view_test_config\calendar_view_test_config.info.yml
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
----------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

🐛 Bug report
Status

Needs work

Version

2.1

Component

Code

Created by

🇺🇸United States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

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