Fix the issues reported by phpcs

Created on 6 July 2023, over 1 year ago

Problem/Motivation

FILE: ...l/vb/d_cont/add_to_calendar/tests/src/Functional/AddToCalendarBaseTest.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
47 | WARNING | Unused variable $entity_type_manager.
--------------------------------------------------------------------------------

FILE: ...ml/vb/d_cont/add_to_calendar/tests/src/Kernel/AddToCalendarDisplayTest.php
--------------------------------------------------------------------------------
FOUND 9 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------
5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be
| | referenced with use statements
6 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be
| | referenced with use statements
12 | WARNING | [x] Unused use statement
12 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be
| | referenced with use statements
46 | ERROR | [ ] The array declaration extends to column 116 (the limit is
| | 80). The array content should be split up over multiple
| | lines
78 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: 'full_html'
87 | ERROR | [x] Expected 1 space between comma and "'\r'"; 0 found
87 | ERROR | [x] Expected one space after the comma, 0 found
122 | ERROR | [x] Expected 1 space between comma and "'\r'"; 0 found
122 | ERROR | [x] Expected one space after the comma, 0 found
159 | ERROR | [ ] Protected method name
| | "AddToCalendarDisplayTest::getUTCEquivalentOfUserNowAsTimestamp"
| | is not in lowerCamel format
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...vb/d_cont/add_to_calendar/src/Plugin/Field/FieldType/AddToCalendarItem.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
10 | ERROR | [x] There must be one blank line after the last USE statement; 2
| | found;
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 267ms; Memory: 12MB

Steps to Reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig add_to_calendar/

Remaining tasks

📌 Task
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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

Comments & Activities

Production build 0.71.5 2024