Created on 3 April 2025, 26 days ago

Problem/Motivation

PHPCS linting run by gitlab ci has identified a number of errors and warnings. These should be resolved to get PHPCS tests passing.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

šŸ‡ŗšŸ‡øUnited States swirt Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @swirt
  • First commit to issue fork.
  • @nidhi27 opened merge request.
  • šŸ‡®šŸ‡³India nidhi27

    Hii,

    I have created MR !5 to resolve phpcs issues.
    Thanks!

  • šŸ‡ŗšŸ‡øUnited States swirt Florida

    Thank you Nidhi27. I will test this out soon.

  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi

    I reviewed MR5! and confirmed it passed phpcs on Gitlab CI. I applied the patch on Node Link Report and it is applied successfully. However there are still phpcs reported by PHP_CodeSniffer shown below:

    āžœ  node_link_report git:(44d130a) curl https://git.drupalcode.org/project/node_link_report/-/merge_requests/5.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  3002    0  3002    0     0   9298      0 --:--:-- --:--:-- --:--:--  9560
    patching file 'src/Form/NodeLinkReportAdminForm.php'
    patching file 'src/Plugin/Block/NodeLinkReport.php'
    āžœ  node_link_report git:(44d130a) āœ— cd ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig node_link_report/
    
    FILE: /Users/jetherparadero/Q1/q1issues/web/modules/contrib/node_link_report/.tugboat/config.yml
    ------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------
     46 | ERROR | [x] Expected 1 newline at end of file; 0 found
    ------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Q1/q1issues/web/modules/contrib/node_link_report/README.md
    --------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------
      2 | WARNING | Line exceeds 80 characters; contains 417 characters
     14 | WARNING | Line exceeds 80 characters; contains 85 characters
     34 | WARNING | Line exceeds 80 characters; contains 140 characters
    --------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Q1/q1issues/web/modules/contrib/node_link_report/node_link_report.libraries.yml
    -----------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------
     5 | ERROR | [x] Expected 1 newline at end of file; 2 found
    -----------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Q1/q1issues/web/modules/contrib/node_link_report/src/Plugin/Block/NodeLinkReport.php
    ------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
    ------------------------------------------------------------------------------------------------------------------------------
        6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Access\AccessResult.
      827 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     1128 | WARNING | [ ] Potential security problem: SSL peer verification must not be disabled
     1175 | WARNING | [ ] Potential security problem: SSL peer verification must not be disabled
    ------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------
    
    Time: 393ms; Memory: 16MB

    Command used: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig node_link_report/

    Kindly check and advise, please.
    Thank you.

Production build 0.71.5 2024