Coding standards are not followed in the module.

Created on 18 August 2022, over 2 years ago
Updated 12 October 2023, about 1 year ago

Problem/Motivation

After applying the phpcs check on the module the following coding standards related errors are shown.
FILE: /app/modules/contrib/search_api_sorts/deprecated_code_check.txt
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
131 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...s/contrib/search_api_sorts/search_api_sorts.links.contextual.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
4 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ..._test_entity/src/Entity/SearchApiSortsTestEntityQueryFactory.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
12 | WARNING | The class short comment should describe what the
| | class does and not simply repeat the class name
----------------------------------------------------------------------

FILE: ...i_sorts_test_entity/src/Entity/SearchApiSortsTestEntityQuery.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class
| | does and not simply repeat the class name
----------------------------------------------------------------------

FILE: ...ontrib/search_api_sorts/tests/src/Functional/IntegrationTest.php
----------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
54 | ERROR | The array declaration extends to column 103 (the
| | limit is 80). The array content should be split up
| | over multiple lines
54 | ERROR | The array declaration extends to column 102 (the
| | limit is 80). The array content should be split up
| | over multiple lines
67 | ERROR | The array declaration extends to column 104 (the
| | limit is 80). The array content should be split up
| | over multiple lines
67 | ERROR | The array declaration extends to column 103 (the
| | limit is 80). The array content should be split up
| | over multiple lines
145 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
149 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
----------------------------------------------------------------------

There are some other files aslo contains the coding standards issues. This files are mentioned in "coding-standard-error.txt" file.

Steps to reproduce

Check coding standard with PHPCS.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Meeni_Dhobale

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024