Fix the issues reported by PHPCS

Created on 12 April 2023, about 2 years ago

Problem/Motivation

Fix all the issues reported by PHPCS for Drupal and DrupalPractice coding standards

FILE: ...l/contribution/drupal10/web/modules/contrib/ckeditor_link_styles/README.md
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
6 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
9 | WARNING | [ ] Line exceeds 80 characters; contains 115 characters
19 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
27 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
29 | WARNING | [ ] Line exceeds 80 characters; contains 111 characters
29 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...dules/contrib/ckeditor_link_styles/tests/src/Unit/LinkStylesPluginTest.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
52 | ERROR | The array declaration extends to column 85 (the limit is 80). The
| | array content should be split up over multiple lines
53 | ERROR | The array declaration extends to column 89 (the limit is 80). The
| | array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: ...les/contrib/ckeditor_link_styles/src/Plugin/CKEditor5Plugin/LinkStyles.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
--------------------------------------------------------------------------------
22 | ERROR | Missing short description in doc comment
32 | ERROR | Missing short description in doc comment
41 | ERROR | Missing short description in doc comment
48 | WARNING | Avoid backslash escaping in translatable strings when possible,
| | use "" quotes instead
62 | ERROR | Missing short description in doc comment
84 | ERROR | Missing short description in doc comment
--------------------------------------------------------------------------------

Time: 521ms; Memory: 10MB

Steps to reproduce

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

Proposed resolution

Fix all the issues based on suggestion and resolve errors in respective files

Remaining tasks

Patch review.

๐Ÿ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia urvashi_vora Madhya Pradesh, India

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