Fix the issues reported by phpcs

Created on 4 April 2023, over 1 year ago
Updated 14 December 2023, 11 months ago

Problem/Motivation

FILE: ...backendassignment\web\modules\contrib\snowball_stemmer-3352065\config\schema\snowball_stemmer.processor.schema.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\snowball_stemmer-3352065\snowball_stemmer.module
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
42 | WARNING | [ ] Unused variable $stemmed.
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\snowball_stemmer-3352065\src\Event\SetLanguageEvent.php
-------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
12 | ERROR | [x] Whitespace found at end of line
17 | ERROR | [x] Whitespace found at end of line
17 | ERROR | [x] Expected "string" but found "string " for @var tag in member variable comment
24 | ERROR | [ ] Missing parameter name
24 | ERROR | [x] Whitespace found at end of line
34 | ERROR | [x] Whitespace found at end of line
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------

FILE: ...endassignment\web\modules\contrib\snowball_stemmer-3352065\src\EventSubscriber\NorwegianLanguageCodeSubscriber.php
------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
19 | ERROR | [ ] Expected type hint "RequestEvent"; found "SetLanguageEvent" for $event
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...ackendassignment\web\modules\contrib\snowball_stemmer-3352065\src\EventSubscriber\RegionLanguageCodeSubscriber.php
------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
14 | ERROR | [x] Whitespace found at end of line
19 | ERROR | [ ] Expected type hint "RequestEvent"; found "SetLanguageEvent" for $event
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\snowball_stemmer-3352065\src\LanguageNotSetException.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------

FILE: ...backendassignment\web\modules\contrib\snowball_stemmer-3352065\src\Plugin\search_api\processor\SnowballStemmer.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
141 | WARNING | [x] 'Todo: What if there is more than one language?' should match the format '@todo Fix problem X
| | here.'
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\snowball_stemmer-3352065\src\Stemmer.php
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------

FILE: ...s\backendassignment\web\modules\contrib\snowball_stemmer-3352065\tests\src\Functional\ProcessorIntegrationTest.php
------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
58 | ERROR | [x] Whitespace found at end of line
97 | ERROR | [x] Whitespace found at end of line
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\snowball_stemmer-3352065\tests\src\Kernel\CoreSearchTest.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
22 | WARNING | [x] A comma should follow the last multiline array item. Found: 'snowball_stemmer'
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...p\htdocs\backendassignment\web\modules\contrib\snowball_stemmer-3352065\tests\src\Kernel\LanguageCodeEventTest.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
21 | WARNING | [x] A comma should follow the last multiline array item. Found: 'snowball_stemmer'
27 | WARNING | [ ] Possible useless method overriding detected
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...ocs\backendassignment\web\modules\contrib\snowball_stemmer-3352065\tests\src\Unit\Plugin\Processor\StemmerTest.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\snowball_stemmer-3352065\tests\src\Unit\StemmerTest.php
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------

Time: 2.09 secs; Memory: 6MB

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs review

Version

2.1

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

  • Issue created by @sidharth_soman
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India sidharth_soman Bangalore

    I ran the phpcs on the module and have found coding standard issues as given in the issue summary. I shall work on fixing them.

  • @sidharth_soman opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sidharth_soman Bangalore

    I have solved the issues. The above MR has been made against the 2.x branch.
    Please review. Thanks.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines paraderojether

    Hi sidharth_soman

    I reviewed MR!6, and there is still 1 remaining error shown below:

    FILE: /Users/studenttrainees/New/drupalorgsite/docroot/modules/contrib/snowball_stemmer/tests/src/Kernel/LanguageCodeEventTest.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------
    27 | WARNING | Possible useless method overriding detected
    ----------------------------------------------------------------------------------------------------------------------------------

    Time: 565ms; Memory: 10MB

    Please check.
    Thank You.

  • Status changed to Needs review 11 months ago
  • 🇮🇳India pray_12

    Fixed phpcs issues

  • Status changed to Needs work 11 months ago
  • Status changed to Needs review 11 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    @pray_12 Please do not delete the issue summary. It is necessary to understand what the issue is.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, report which command has been used, which arguments have been used, and which report that command shown.

Production build 0.71.5 2024