Fix the issues reported by phpcs

Created on 7 February 2023, almost 2 years ago
Updated 4 February 2024, 10 months ago

Problem/Motivation

Running $ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml all_entity_preview shows the following errors/warnings.

FILE: C:\Users\Admin\Desktop\task\all_entity_preview\preview.module
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
  8 | ERROR | [x] There must be one blank line after the last USE statement; 0
    |       |     found;
 12 | ERROR | [x] Expected 1 blank line before function; 0 found

FILE: ...in\Desktop\task\all_entity_preview\src\Access\EntityPreviewAccessCheck.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"

FILE: ...Admin\Desktop\task\all_entity_preview\src\Controller\PreviewController.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"

FILE: C:\Users\Admin\Desktop\task\all_entity_preview\src\Form\PreviewForm.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"

FILE: ...ers\Admin\Desktop\task\all_entity_preview\src\Form\PreviewSettingsForm.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"

FILE: ...in\Desktop\task\all_entity_preview\src\ParamConverter\PreviewConverter.php
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"

FILE: C:\Users\Admin\Desktop\task\all_entity_preview\src\PreviewFormService.php
   1 | ERROR | [x] End of line character is invalid; expected "\n" but found
     |       |     "\r\n"
 153 | ERROR | [ ] Missing parameter type
 155 | ERROR | [ ] Missing parameter type

Proposed resolution

Fix the errors and warnings.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Jay Jangid

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