[META] Fix the errors/warnings reported by PHP_CodeSniffer

Created on 7 December 2016, almost 8 years ago
Updated 31 July 2024, 4 months ago

Right now in module there are 100 errors and 25 warnings in 31 files.
In order to simplify review process this issue splited to several issues to fix specific phpcs rules.

Child issue with list of rules to fix:

๐Ÿ“Œ Fix phpcs Drupal.WhiteSpace, Squiz.WhiteSpace issues Needs review

  • Drupal.WhiteSpace.ScopeIndent
  • Drupal.WhiteSpace.OpenBracketSpacing
  • Drupal.WhiteSpace.CloseBracketSpacing
  • Squiz.WhiteSpace.FunctionSpacing
  • Squiz.WhiteSpace.SuperfluousWhitespace

๐Ÿ“Œ Fix phpcs Drupal.Arrays.Array issues Needs review

  • Drupal.Arrays.Array

๐Ÿ“Œ Fix phpcs Drupal.Classes, DrupalPractice.FunctionCalls, SlevomatCodingStandard.PHP, Drupal.Semantics Needs review

  • Drupal.Classes.UnusedUseStatement
  • DrupalPractice.FunctionCalls.InsecureUnserialize
  • SlevomatCodingStandard.PHP.ShortList
  • Drupal.Semantics.FunctionT

๐Ÿ“Œ Fix phpcs Drupal.Files.LineLength issues Needs work

  • Drupal.Files.LineLength

๐Ÿ“Œ Fix phpcs Drupal.Commenting issues Needs work

  • Drupal.Commenting.DocComment
  • Drupal.Commenting.FunctionComment
  • Drupal.Commenting.InlineVariableComment
  • Drupal.Commenting.ClassComment
  • Drupal.Commenting.DataTypeNamespace
  • Drupal.Commenting.Deprecated
  • Drupal.Commenting.FileComment
  • Drupal.Commenting.InlineComment

Command to get phpcs report:

phpcs --standard=Drupal,DrupalPractice --extensions=php,inc,module,install,info,test,profile,theme modules/custom/pathauto/

PHPCS report:

https://www.drupal.org/files/issues/2024-01-22/report.txt โ†’

๐ŸŒฑ Plan
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡ทBrazil renatog Campinas

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024