Fix the issues reported by phpcs

Created on 21 July 2023, over 1 year ago
Updated 10 August 2023, over 1 year ago

Problem/Motivation

FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/search_api_meilisearch/search_api_meilisearch.module
--------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
 9 | WARNING | [x] Unused use statement
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/search_api_meilisearch/src/Plugin/search_api/processor/Synonyms.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
 156 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/search_api_meilisearch/src/Plugin/search_api/backend/SearchApiMeiliSearchBackend.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------
 18 | ERROR   | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
 33 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
----------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/search_api_meilisearch/src/Api/MeiliSearchApiService.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 14 ERRORS AND 1 WARNING AFFECTING 15 LINES
------------------------------------------------------------------------------------------------------------------------------------
  13 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 105 | ERROR   | [x] Expected newline after closing brace
 133 | ERROR   | [x] Expected newline after closing brace
 144 | ERROR   | [x] Expected newline after closing brace
 146 | ERROR   | [x] Expected newline after closing brace
 157 | ERROR   | [x] Expected newline after closing brace
 159 | ERROR   | [x] Expected newline after closing brace
 172 | ERROR   | [x] Expected newline after closing brace
 249 | ERROR   | [x] Expected newline after closing brace
 354 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
 360 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 9
 370 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
 450 | ERROR   | [x] Expected newline after closing brace
 486 | ERROR   | [x] Expected newline after closing brace
 497 | ERROR   | [x] Expected newline after closing brace
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/search_api_meilisearch/src/Api/MeiliSearchApiServiceInterface.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
  7 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 94 | ERROR   | [x] Separate the @throws and @see sections by a blank line.
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/search_api_meilisearch/src/Client/MeiliSearchClientFactory.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
 17 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

Time: 454ms; Memory: 14MB

Steps to reproduce

Please execute this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig search_api_meilisearch/

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇵🇭Philippines roberttabigue

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

  • Issue created by @roberttabigue
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India mrinalini9 New Delhi

    Added patch for the above phpcs issues, please review it.

    Thanks!

  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi,

    I reviewed the changes and confirmed the Patch was applied cleanly to the Search API MeiliSearch module against 1.0.x-dev on Drupal 9.5.10.

    Checking patch search_api_meilisearch.module...
    Checking patch src/Api/MeiliSearchApiService.php...
    Checking patch src/Api/MeiliSearchApiServiceInterface.php...
    Checking patch src/Client/MeiliSearchClientFactory.php...
    Checking patch src/Plugin/search_api/backend/SearchApiMeiliSearchBackend.php...
    Checking patch src/Plugin/search_api/processor/Synonyms.php...
    Applied patch search_api_meilisearch.module cleanly.
    Applied patch src/Api/MeiliSearchApiService.php cleanly.
    Applied patch src/Api/MeiliSearchApiServiceInterface.php cleanly.
    Applied patch src/Client/MeiliSearchClientFactory.php cleanly.
    Applied patch src/Plugin/search_api/backend/SearchApiMeiliSearchBackend.php cleanly.
    Applied patch src/Plugin/search_api/processor/Synonyms.php cleanly.

    And all PHPCS errors have been fixed.

    I re-ran this command on the module:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig search_api_meilisearch/

    Please see the attached file for reference.

    I'm moving this now to RTBC.

    Thank you!

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Build Successful
  • @bcizej opened merge request.
  • Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Waiting for branch to pass
    • bcizej committed 3bb3d9ba on 1.0.x
      Issue #3376129 by mrinalini9, roberttabigue: Fix the issues reported by...
  • Status changed to Fixed over 1 year ago
  • 🇸🇮Slovenia bcizej

    Thanks, commited.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024