Fixes for remaining code quality issues

Created on 11 April 2024, 8 months ago
Updated 3 July 2024, 5 months ago

Problem/Motivation

Before 3.0.0, try to fix any further phpstan issues from latest pipeline run. These aren't all the issues when running locally, but it will help with green colors.

https://git.drupalcode.org/project/agreement/-/pipelines/144168/codequal...

Ignore the drupal 12.0.0 compatibility warning.

Proposed resolution

Fixes code quality issues without breaking compatibility.

Remaining tasks

Ensure automated tests pass after creating merge request with fixes

๐Ÿ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States mradcliffe USA

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

Merge Requests

Comments & Activities

  • Issue created by @mradcliffe
  • Status changed to Needs review 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mradcliffe USA
  • First commit to issue fork.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia mitthukumawat

    Fixed some of the coding standard issues occurred when running phpcs with Drupal and DrupalPractice.

    /modules/contrib $ phpcs --standard=DrupalPractice --extensions=php,module,inc,install agreement/
    
    FILE: modules/contrib/agreement/agreement.module
    ------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------
     61 | WARNING | Unused variable $id.
    ------------------------------------------------------------------------
    
    FILE: modules/contrib/agreement/src/Entity/AgreementForm.php
    ------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------
     106 | WARNING | Unused variable $role_name.
    ------------------------------------------------------------------------------------
    
     /modules/contrib $ phpcs --standard=Drupal --extensions=php,module,inc,install agreement/
    
    FILE: modules/contrib/agreement/tests/src/Functional/AgreementCustomUnprivilegedUserTest.php
    ------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------------
     183 | WARNING | [x] '@todo: Log in following password reset link, go somewhere other than' should match the format '@todo Fix problem X here.'
    ------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: modules/contrib/agreement/agreement.install
    -----------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------
     64 | ERROR | Doc comment short description must start with a capital letter
    -----------------------------------------------------------------------------
  • Pipeline finished with Failed
    8 months ago
    Total: 227s
    #144851
  • Status changed to Needs work 7 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mradcliffe USA
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

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

  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    Hi,
    I have fixed below phpcs issue, Please review.

    modules/custom/agreement/
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/agreement/agreement.links.task.yml
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------
     12 | ERROR | [x] Expected 1 newline at end of file; 0 found
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/agreement/agreement.links.menu.yml
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------
     5 | ERROR | [x] Expected 1 newline at end of file; 0 found
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/agreement/README.md
    ----------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    ----------------------------------------------------------------------------------------------------------
      3 | WARNING | Line exceeds 80 characters; contains 348 characters
      5 | WARNING | Line exceeds 80 characters; contains 386 characters
     10 | WARNING | Line exceeds 80 characters; contains 126 characters
     21 | WARNING | Line exceeds 80 characters; contains 145 characters
     29 | WARNING | Line exceeds 80 characters; contains 126 characters
    ----------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/agreement/migrations/agreement_types.yml
    -------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------
     39 | ERROR | [x] Expected 1 newline at end of file; 0 found
    -------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------------
    
    Time: 718ms; Memory: 12MB
  • Pipeline finished with Failed
    6 months ago
    Total: 220s
    #189530
  • Status changed to Needs work 6 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mradcliffe USA

    Thank you for continuing work on this issue.

    I would prefer not to change the README.md file from what it is in this issue.

    The tests are still failing due to the is merge request so I am putting this back in Needs work.

  • First commit to issue fork.
  • Merge request !19Issue #3440317 "Phpstan fixes" โ†’ (Merged) created by ankitv18
  • Pipeline finished with Failed
    5 months ago
    Total: 155s
    #199830
  • Pipeline finished with Failed
    5 months ago
    Total: 222s
    #199845
  • Pipeline finished with Failed
    5 months ago
    Total: 210s
    #199874
  • Pipeline finished with Success
    5 months ago
    Total: 211s
    #199877
  • Pipeline finished with Success
    5 months ago
    Total: 212s
    #199881
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18

    ankitv18 โ†’ changed the visibility of the branch 3440317-fixes-for-remaining to hidden.

  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18

    MR!19 is ready for a review.

  • Pipeline finished with Success
    5 months ago
    Total: 213s
    #200615
  • Pipeline finished with Success
    5 months ago
    Total: 228s
    #202844
  • Pipeline finished with Skipped
    5 months ago
    #202857
  • Status changed to Fixed 5 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mradcliffe USA

    Thank you for all the effort. Following up with any 11 issues in the next project update bot run in ๐Ÿ“Œ Automated Drupal 11 compatibility fixes for agreement Needs review .

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024