Fix the issues reported by phpcs

Created on 3 June 2023, over 1 year ago
Updated 8 August 2023, over 1 year ago

Problem/Motivation

Missing coding standards

Steps to reproduce

Run the command:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml feeds_ldap

Proposed resolution

Fix the following coding standards issues and create an MR with fixes.

FILE: ./feeds_ldap/feeds_ldap.install
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
-------------------------------------------------------------------------


FILE: ./feeds_ldap/src/Feeds/Parser/EntryParser.php
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\feeds\Result\ParserResult.
-------------------------------------------------------------------------


FILE: ./feeds_ldap/src/Feeds/Fetcher/Form/QueryFetcherFeedForm.php
-------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
-------------------------------------------------------------------------
  6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
  8 | WARNING | [x] Unused use statement
 28 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
-------------------------------------------------------------------------


FILE: ./feeds_ldap/src/Feeds/Fetcher/QueryFetcher.php
-------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------
  8 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\feeds\Plugin\Type\PluginBase.
  9 | WARNING | [x] Unused use statement
 50 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead
 62 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         |     $this->t() instead
-------------------------------------------------------------------------


FILE: ./feeds_ldap/feeds_ldap.info.yml
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------
 7 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
 8 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
 9 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
-------------------------------------------------------------------------

📌 Task
Status

RTBC

Version

4.0

Component

Code

Created by

🇮🇳India arti_parmar

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