Fix the issues reported by phpcs

Created on 20 April 2023, over 2 years ago
Updated 22 April 2023, over 2 years ago

Problem/Motivation

Fix the issues reported by PHP Code Sniffer

Steps to reproduce

Execute the command: phpcs --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml i18n/i18n_user/i18n_user.module

Proposed resolution

Fix all the issues:

FILE: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/leboat/modules/contrib/i18n/i18n_user/i18n_user.module
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 1 WARNING AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
19 | ERROR | [x] Use null coalesce operator instead of ternary operator.
27 | ERROR | [ ] The array declaration extends to column 144 (the limit is 80). The array content should be split up over multiple lines
58 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
58 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
60 | ERROR | [x] Trailing punctuation for @see references is not allowed.
64 | ERROR | [ ] The array declaration extends to column 206 (the limit is 80). The array content should be split up over multiple lines
69 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
75 | ERROR | [ ] The array declaration extends to column 215 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

Time: 64ms; Memory: 10MB

📌 Task
Status

Closed: duplicate

Version

1.0

Component

User interface

Created by

🇮🇳India vimal_nadar

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