Problem/Motivation

This issue is to start looking at PHPCS issues in the Project Browser project. As there are 83 problems reported, I'm concerned that fixing them all in one issue will be difficult to review. For this issue I'm looking at the 30 cases of missing function doc comments.

PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
--------------------------------------------------------------------------------------------
    SOURCE                                                                             COUNT
--------------------------------------------------------------------------------------------
[x] Drupal.Commenting.FunctionComment.Missing                                          30
[ ] Drupal.Files.LineLength.TooLong                                                    16
[x] Drupal.Commenting.InlineComment.SpacingAfter                                       9
[ ] Drupal.Arrays.Array.LongLineDeclaration                                            6
[ ] Drupal.Commenting.FunctionComment.MissingReturnComment                             5
[x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses  5
[x] Drupal.Commenting.ClassComment.Missing                                             3
[ ] Drupal.Semantics.FunctionT.NotLiteralString                                        3
[x] Drupal.Commenting.InlineComment.InvalidEndChar                                     2
[ ] Drupal.Commenting.FunctionComment.MissingParamType                                 1
[ ] Drupal.NamingConventions.ValidFunctionName.InvalidPrefix                           1
[ ] Generic.CodeAnalysis.UselessOverridingMethod.Found                                 1
[ ] Squiz.Arrays.ArrayDeclaration.NoKeySpecified                                       1
--------------------------------------------------------------------------------------------
A TOTAL OF 83 SNIFF VIOLATIONS WERE FOUND IN 13 SOURCES
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SOURCES AUTOMATICALLY (49 VIOLATIONS IN TOTAL)
--------------------------------------------------------------------------------------------

Steps to reproduce

Run PHPCS. See errors reported.

Proposed resolution

For this issue, fix missing function doc comments. Other PHPCS issues will be fixed in follow on issues.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lostcarpark created an issue. See original summary.

lostcarpark changed the visibility of the branch 3418454-gitlab-ci-- to hidden.

lostcarpark’s picture

Status: Active » Needs review

This MR contains fixes PHPCS reports of type "Missing function doc comment". Other PHPCS errors have not been fixed to make review simpler.

PHPCS is still reporting errors, but it should be safe to merge and fix other issues in later issues.

pfrilling’s picture

Status: Needs review » Reviewed & tested by the community

The code changes look good to me. Marked as RTBC.

chrisfromredfin made their first commit to this issue’s fork.

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Active

Wonderful progress to see. Thanks, everyone!

chrisfromredfin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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