Fix the issues reported by phpcs

Created on 13 June 2023, over 1 year ago
Updated 6 June 2024, 7 months ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/graphql_search_api_solr/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
6 | WARNING | Line exceeds 80 characters; contains 84 characters
43 | WARNING | Line exceeds 80 characters; contains 84 characters
----------------------------------------------------------------------

FILE: ...ar/www/html/vb/d_cont/graphql_search_api_solr/src/Query/SearchApiQuery.php
--------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------
27 | ERROR | Missing @var tag in member variable comment
32 | ERROR | Missing @var tag in member variable comment
37 | ERROR | Missing @var tag in member variable comment
42 | ERROR | Missing @var tag in member variable comment
47 | ERROR | Missing @var tag in member variable comment
52 | ERROR | Missing @var tag in member variable comment
57 | ERROR | Missing @var tag in member variable comment
--------------------------------------------------------------------------------

FILE: .../d_cont/graphql_search_api_solr/src/Plugin/GraphQL/Wrappers/FacetsList.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
14 | ERROR | Missing @var tag in member variable comment
19 | ERROR | Missing @var tag in member variable comment
--------------------------------------------------------------------------------

FILE: .../d_cont/graphql_search_api_solr/src/Plugin/GraphQL/Wrappers/FacetValue.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
12 | ERROR | Missing @var tag in member variable comment
17 | ERROR | Missing @var tag in member variable comment
22 | ERROR | Missing @var tag in member variable comment
--------------------------------------------------------------------------------

FILE: ..._cont/graphql_search_api_solr/src/Plugin/GraphQL/Wrappers/SolrDocument.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
14 | ERROR | Missing @var tag in member variable comment
19 | ERROR | Missing @var tag in member variable comment
47 | WARNING | Unused variable $resultFields.
--------------------------------------------------------------------------------

FILE: ...l_search_api_solr/src/Plugin/GraphQL/DataProducer/SearchApi/SolrSearch.php
--------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
89 | ERROR | Type hint "\Drupal\search_api\ParseMode\ParseModePluginManager"
| | missing for $parseModeManager
89 | ERROR | Type hint "\Drupal\Core\Logger\LoggerChannel" missing for
| | $logger
89 | ERROR | Type hint "\Drupal\Core\Pager\PagerManager" missing for
| | $pagerManager
132 | ERROR | Type hint "array" missing for $facets
172 | ERROR | Type hint "array" missing for $facets
172 | ERROR | Type hint "array" missing for $fieldNames
--------------------------------------------------------------------------------

Time: 226ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig graphql_search_api_solr/

Proposed resolution

Fix the issues reported for Drupal and DrupalPractice coding standards.

Remaining tasks

Patch review

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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

Merge Requests

Comments & Activities

  • Issue created by @urvashi_vora
  • 🇵🇭Philippines clarkssquared

    Hi urvashi_vora

    I tested the PHPCS for GraphQL Search API Solr v1.0.x-dev to my local with Drupal 9.5.9 and I noticed that the PHPCS errors are few on my end compared to the errors you reported, however, I applied your coding-standard-fixed.patch and it fixed the PHPCS errors of the module in my end, retaining this to needs review for someone to review and replicate the same errors you reported for the patch's effectivity.

    Please look at the screenshot attached for your reference

  • Status changed to RTBC 10 months ago
  • 🇫🇷France b2f

    Could you please add a fork on gitlab ?

  • First commit to issue fork.
  • Merge request !6Fix errors reported by phpcs #3366399 → (Open) created by smavri
Production build 0.71.5 2024