Drupal Coding Standards Issues | phpcs

Created on 15 February 2023, almost 2 years ago
Updated 25 April 2023, over 1 year ago

Problem/Motivation

FILE: ...ules\node_edit_action\src\EventSubscriber\RedirectSubscriber.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
25 | ERROR | [x] Expected 1 space before opening brace; found 2
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...dules\node_edit_action\src\Exception\RedirectToFormException.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: ...\drupal\modules\node_edit_action\src\Form\NodeEditActionForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
242 | ERROR | [ ] unserialize() is insecure unless allowed classes
| | are limited. Use a safe format like JSON or use
| | the allowed_classes option.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...al\modules\node_edit_action\src\Plugin\Action\NodeEditAction.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
----------------------------------------------------------------------

Steps to reproduce

Run following command -
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/node_edit_action/

Proposed resolution

Above error/warnings need to be fixed.

📌 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.71.5 2024