Fix php code sniffer issues

Created on 16 April 2021, over 3 years ago
Updated 16 April 2024, 6 months ago

Now with the latest Drulal php code sniffer there are errors on the phpcs
checks:

The report:

 FILE: flag_search_api/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 19 | WARNING | Line exceeds 80 characters; contains 86 characters
 20 | WARNING | Line exceeds 80 characters; contains 83 characters
----------------------------------------------------------------------


FILE: flag_search_api/src/Form/FlagSearchApiConfigForm.php
------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------
 35 | ERROR | [x] Short array syntax must be used to define arrays
 40 | ERROR | [x] Short array syntax must be used to define arrays
 47 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------


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


FILE: flag_search_api/src/Plugin/search_api/processor/FlagIndexer.php
-----------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------
  72 | ERROR | [x] Short array syntax must be used to define arrays
  73 | ERROR | [x] Short array syntax must be used to define arrays
  88 | ERROR | [x] Short array syntax must be used to define arrays
 121 | ERROR | [x] Short array syntax must be used to define arrays
 142 | ERROR | [x] Short array syntax must be used to define arrays
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------


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


FILE: flag_search_api/src/EventSubscriber/FlagSearchApiSubscriber.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
-----------------------------------------------------------------------------------------------------------------

I'm going to fix these coding standards issues :) Basically the module is very useful and I'm glad that I can help supporting it.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇬Bulgaria a.sotirov

Live updates comments and jobs are added and updated live.
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