Fix phpcs errors

Created on 13 April 2024, 7 months ago
Updated 27 April 2024, 7 months ago

Problem/Motivation

FILE: C:\Sites\d9local\web\modules\custom\taxonomy_translation_imp_exp\src\Batch\TaxonomyReportGeneration.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 87 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 90 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 94 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 98 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\Sites\d9local\web\modules\custom\taxonomy_translation_imp_exp\src\Form\ExportTaxonomyTranslationsForm.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AFFECTING 11 LINES
-----------------------------------------------------------------------------------------------------------------------------
   1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 112 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 112 | ERROR | [x] Comments may not appear after statements
 114 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
 119 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 120 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 121 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 122 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 123 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 127 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
 128 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
 134 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
 134 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 0
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------


FILE: C:\Sites\d9local\web\modules\custom\taxonomy_translation_imp_exp\src\Form\ImportTaxonomyTranslationsForm.php
------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 11 | ERROR | [ ] Doc comment is empty
 99 | ERROR | [ ] Doc comment is empty
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------

Time: 418ms; Memory: 10MB

Steps to reproduce

phpcs --standard='Drupal,DrupalPractice' taxonomy_translation_imp_exp/
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India imustakim Ahmedabad

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