Fix the issues reported by phpcs

Created on 11 July 2023, 12 months ago
Updated 5 June 2024, 19 days ago

Fixed Phpcs issues.

๐Ÿ“Œ Task
Status

Needs review

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
  • Status changed to Needs work 8 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    Provided patch applied cleanly but still found one remaining error.

    Used command.
    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/search_logs

    Remaining errors
    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/search_logs/search_logs.module
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    28 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "search_log_search_api_solr_search_results_alter" but expected
    | | "search_logs_search_log_search_api_solr_search_results_alter"
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Time: 246ms; Memory: 10MB

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia MukhtarM

    I think its a typo in the hook implementation. Its implmenting hook_search_api_solr_search_results_alter as mentioned in modules/contrib/search_api_solr/search_api_solr.api.php. please review the patch. thanks

  • First commit to issue fork.
  • Status changed to Needs review 7 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia urvashi_vora Madhya Pradesh, India
  • Status changed to RTBC 7 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi

    I applied patch #5 and I confirmed that it fixes all the PHPCS errors, the remaining issues being flagged in my terminal appears when the module is installed using composer.

    โžœ  search_logs git:(master) โœ— curl https://www.drupal.org/files/issues/2023-11-17/phpcs-fixes-3373765-5.patch | patch -p1  
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  7686  100  7686    0     0  25043      0 --:--:-- --:--:-- --:--:-- 25791
    patching file README.md
    patching file search_logs.module
    patching file 'src/SearchLogger.php'
    โžœ  search_logs git:(master) โœ— ..
    โžœ  contrib git:(master) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml search_logs 
    
    FILE: .../Projects/d9/d9-local/web/modules/contrib/search_logs/search_logs.info.yml
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     1 | WARNING | Remove "project" from the info file, it will be added by
       |         | drupal.org packaging automatically
     1 | WARNING | Remove "datestamp" from the info file, it will be added by
       |         | drupal.org packaging automatically
     1 | WARNING | Remove "version" from the info file, it will be added by
       |         | drupal.org packaging automatically
    --------------------------------------------------------------------------------
    
    Time: 231ms; Memory: 10MB
    
    โžœ  contrib git:(master) โœ— 
    
  • First commit to issue fork.
  • Merge request !1Fixed the issues reported by phpcs โ†’ (Open) created by realsp
  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia realsp

    The patch #5 fixed the phpcs errors (the SearchLogger.php file required Dependency injection included with namespace, and services.yml updated), I've created MR to fix these issues, Please review the MR, Thank you.

  • Status changed to Needs work 4 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Yashaswi18

    Cloned the repository, checked out to the branch '3373765-fix-the-issues' and ran the command phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml search_logs/

    Found these issues remaining:

    ------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
       |       |     Drupal\Core\Entity\EntityTypeManagerInterface.
    ------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/yashaswi/contribs/search_logs/README.md
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
    ----------------------------------------------------------------------
      1 | WARNING | Line exceeds 80 characters; contains 290 characters
      7 | WARNING | Line exceeds 80 characters; contains 81 characters
     11 | WARNING | Line exceeds 80 characters; contains 160 characters
     15 | WARNING | Line exceeds 80 characters; contains 137 characters
     19 | WARNING | Line exceeds 80 characters; contains 97 characters
     21 | WARNING | Line exceeds 80 characters; contains 110 characters
     23 | WARNING | Line exceeds 80 characters; contains 81 characters
     25 | WARNING | Line exceeds 80 characters; contains 95 characters
     31 | WARNING | Line exceeds 80 characters; contains 235 characters
     39 | WARNING | Line exceeds 80 characters; contains 89 characters
     41 | WARNING | Line exceeds 80 characters; contains 164 characters
     45 | WARNING | Line exceeds 80 characters; contains 204 characters
     49 | WARNING | Line exceeds 80 characters; contains 189 characters
     53 | WARNING | Line exceeds 80 characters; contains 120 characters
     57 | WARNING | Line exceeds 80 characters; contains 306 characters
    ----------------------------------------------------------------------
    
    
  • First commit to issue fork.
  • Status changed to Needs review 4 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Shank115

    Found these issues, hopefully we can ignore them:

    FILE: /home/sites/search_logs/README.md
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
    ----------------------------------------------------------------------
      1 | WARNING | Line exceeds 80 characters; contains 290 characters
      7 | WARNING | Line exceeds 80 characters; contains 81 characters
     11 | WARNING | Line exceeds 80 characters; contains 160 characters
     15 | WARNING | Line exceeds 80 characters; contains 137 characters
     19 | WARNING | Line exceeds 80 characters; contains 97 characters
     21 | WARNING | Line exceeds 80 characters; contains 110 characters
     23 | WARNING | Line exceeds 80 characters; contains 81 characters
     25 | WARNING | Line exceeds 80 characters; contains 95 characters
     31 | WARNING | Line exceeds 80 characters; contains 235 characters
     39 | WARNING | Line exceeds 80 characters; contains 89 characters
     41 | WARNING | Line exceeds 80 characters; contains 164 characters
     45 | WARNING | Line exceeds 80 characters; contains 204 characters
     49 | WARNING | Line exceeds 80 characters; contains 189 characters
     53 | WARNING | Line exceeds 80 characters; contains 120 characters
     57 | WARNING | Line exceeds 80 characters; contains 306 characters
    ----------------------------------------------------------------------
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

Production build 0.69.0 2024