Fix the issues reported by phpcs

Created on 16 February 2023, over 1 year ago
Updated 27 April 2023, about 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\abc\drupal\modules\keycdn\keycdn.services.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: C:\xampp\htdocs\abc\drupal\modules\keycdn\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
4 | WARNING | Line exceeds 80 characters; contains 119 characters
----------------------------------------------------------------------

FILE: ...cs\abc\drupal\modules\keycdn\src\Entity\KeyCDNPurgerSettings.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
40 | ERROR | [ ] Class property $api_key should use lowerCamel
| | naming without underscores
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...les\keycdn\src\EventSubscriber\KeycdnCacheTagHeaderGenerator.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
9 | ERROR | [x] Missing class doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...cs\abc\drupal\modules\keycdn\src\Form\KeyCDNPurgerConfigForm.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
29 | ERROR | [ ] Missing parameter comment
56 | ERROR | [ ] Public method name
| | "KeyCDNPurgerConfigForm::getFormID" is not in
| | lowerCamel format
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...s\keycdn\src\Plugin\Purge\DiagnosticCheck\ConfigurationCheck.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...c\drupal\modules\keycdn\src\Plugin\Purge\Purger\KeyCDNPurger.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
74 | ERROR | [ ] Missing parameter comment
264 | ERROR | [ ] The array declaration extends to column 87 (the
| | limit is 80). The array content should be split up
| | over multiple lines
269 | ERROR | [ ] The array declaration extends to column 91 (the
| | limit is 80). The array content should be split up
| | over multiple lines
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...\abc\drupal\modules\keycdn\tests\src\Kernel\KeyCDNPurgerTest.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
11 | ERROR | [x] Missing class doc comment
13 | ERROR | [ ] Missing member variable doc comment
93 | ERROR | [ ] The array declaration extends to column 86 (the
| | limit is 80). The array content should be split up
| | over multiple lines
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Steps to reproduce

Run the following command :
phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /10.1.x/drupal/modules/contrib/keycdn

Proposed resolution

Fix all the PHP coding standard issues.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Charchil Khandelwal

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

Comments & Activities

Production build 0.69.0 2024