Fix Drupal.Commenting.FunctionComment.Missing in Plugins not in tests

Created on 3 February 2025, 19 days ago

Problem/Motivation

Working to enable the sniff Drupal.Commenting.FunctionComment.Missing.

Now that most of the views plugins have been fixed in other issue, fix this sniff for all Plugins not in tests

Steps to reproduce

Proposed resolution

Fix this sniff for all Plugins not in tests

Remaining tasks

Review

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

other

Created by

🇳🇿New Zealand quietone

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

Merge Requests

Comments & Activities

  • Issue created by @quietone
  • 🇳🇿New Zealand quietone

    Passed linting so setting to NR.

  • Pipeline finished with Success
    19 days ago
    Total: 1081s
    #412950
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    Looks good, pipelines are green

  • First commit to issue fork.
  • 🇫🇷France nod_ Lille

    CI is green but pre-commit checks are not, and can't commit. Getting

    Running PHPStan on changed files.
     ------ ----------------------------------------------------------------------------------------------------------------- 
      Line   modules/filter/src/Plugin/Filter/FilterHtml.php                                                                  
     ------ ----------------------------------------------------------------------------------------------------------------- 
      268    Method                                                                                                           
             Masterminds\HTML5\Parser\Tokenizer@anonymous/modules/filter/src/Plugin/Filter/FilterHtml.php:265::setTextMode()  
             has no return type specified.                                                                                    
             🪪  missingType.return                                                                                           
     ------ ----------------------------------------------------------------------------------------------------------------- 
    
    
                                                                                    
     [ERROR] Found 1 error                                                          
                                                                                    
    
    
  • Pipeline finished with Failed
    19 days ago
    Total: 609s
    #413306
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇳🇿New Zealand quietone

    I am confused by this. The baseline does have an ignore line, which is

    $ignoreErrors[] = [
    	'message' => '#^Method Masterminds\\\\HTML5\\\\Parser\\\\Tokenizer@anonymous/core/modules/filter/src/Plugin/Filter/FilterHtml\\.php\\:268\\:\\:setTextMode\\(\\) has no return type specified\\.$#',
    	'identifier' => 'missingType.return',
    	'count' => 1,
    	'path' => __DIR__ . '/modules/filter/src/Plugin/Filter/FilterHtml.php',
    ];

    The difference is that the base line has /core/modules/filter but the pre-commit check has /modules/filter.

    It can be fixed by adding a void return to the function, but that is out of scope.

Production build 0.71.5 2024