Fix the issues reported by phpcs

Created on 2 June 2023, over 1 year ago
Updated 6 June 2023, over 1 year ago

Problem/Motivation

Found this issues reported by phpcs:

FILE: ...g/drupalorg-site/docroot/modules/contrib/xls_serialization/tests/src/Unit/Encoder/XlsTest.php
---------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
---------------------------------------------------------------------------------------------------
  28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  29 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
  30 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
 164 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
 164 | ERROR | [x] Closing brace indented incorrectly; expected 0 spaces, found 1
 166 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------


FILE: ...studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/xls_serialization/README.md
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------
 24 | WARNING | [ ] Line exceeds 80 characters; contains 118 characters
 25 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
 27 | ERROR   | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------


FILE: ...inees/Drupal.org/drupalorg-site/docroot/modules/contrib/xls_serialization/src/Encoder/Xls.php
---------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
---------------------------------------------------------------------------------------------------
 355 | ERROR | [x] Whitespace found at end of line
 360 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
 360 | ERROR | [x] Whitespace found at end of line
 361 | ERROR | [x] Whitespace found at end of line
 363 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
 485 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

Time: 547ms; Memory: 12MB

Steps to reproduce

Run this command in the module folder: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml

Proposed resolution

Remaining tasks

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇵🇭Philippines paraderojether

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