Fix the issues reported by phpcs (module file and install file)

Created on 10 May 2023, over 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\media_contextual_crop_field_formatter-3359283\media_contextual_crop_field_formatter.install
-------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
4 | ERROR | [ ] Doc comment short description must end with a full stop
31 | ERROR | [x] Expected 1 space after IF keyword; 0 found
44 | ERROR | [x] Expected 1 space after IF keyword; 0 found
-------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\media_contextual_crop_field_formatter-3359283\media_contextual_crop_field_formatter.module
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
22 | ERROR | [x] Expected 1 space after IF keyword; 0 found
27 | ERROR | [x] Closing brace must be on a line by itself
31 | ERROR | [x] Expected 1 blank line after function; 3 found
34 | ERROR | [ ] More than 2 empty lines are not allowed
57 | ERROR | [x] Expected 1 space after IF keyword; 0 found
57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
61 | ERROR | [x] There should be no white space after an opening "("
61 | ERROR | [x] There should be no white space before a closing ")"
------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.2

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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