The docblocks in file core/modules/views/src/Plugin/views/filter/FilterPluginBase.php need some TLC. There appear to be a number of @param and @return directives that are missing. Also one needs to check and possibly correct the verb tense(s) in the short one-line function summaries.

Comments

Lars Toomre created an issue. See original summary.

Lars Toomre’s picture

Title: Fix docblocks in » Fix docblocks in views/filter/FilterPluginBase.php
Related issues: +#2608732: Some fixes for 'optional' parameter in core/modules

This issue was identified as part of fixing #2608732: Some fixes for 'optional' parameter in core/modules.

Lars Toomre’s picture

This issue was created as a result of working on #2608732: Some fixes for 'optional' parameter in core/modules.

Running the Drupal standard coder_sniff against this one file results in the following list of sniff results. While some of these results may be wrong, each line probably should be reviewed.

FILE: D:\Webs\tcm-dru8\core\modules\views\src\Plugin\views\filter\FilterPluginBase.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 87 ERRORS AND 10 WARNINGS AFFECTING 71 LINES
------------------------------------------------------------------------------------------------------------------------------------
   52 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
      |         |     (Drupal.Commenting.InlineComment.DocBlock)
   54 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
   56 | ERROR   | [ ] The var keyword must not be used to declare a property (PSR2.Classes.PropertyDeclaration.VarUsed)
   56 | ERROR   | [ ] Visibility must be declared on property "$value" (PSR2.Classes.PropertyDeclaration.ScopeMissing)
   58 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
      |         |     (Drupal.Commenting.InlineComment.DocBlock)
   61 | ERROR   | [ ] The var keyword must not be used to declare a property (PSR2.Classes.PropertyDeclaration.VarUsed)
   61 | ERROR   | [ ] Visibility must be declared on property "$operator" (PSR2.Classes.PropertyDeclaration.ScopeMissing)
   63 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
      |         |     (Drupal.Commenting.InlineComment.DocBlock)
   66 | ERROR   | [ ] Class property $group_info should use lowerCamel naming without underscores
      |         |     (Drupal.NamingConventions.ValidVariableName.LowerCamelName)
   66 | ERROR   | [ ] The var keyword must not be used to declare a property (PSR2.Classes.PropertyDeclaration.VarUsed)
   66 | ERROR   | [ ] Visibility must be declared on property "$group_info" (PSR2.Classes.PropertyDeclaration.ScopeMissing)
   68 | ERROR   | [ ] Missing short description in doc comment (Drupal.Commenting.DocComment.MissingShort)
   74 | ERROR   | [ ] Missing short description in doc comment (Drupal.Commenting.DocComment.MissingShort)
   74 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
      |         |     (Drupal.Commenting.InlineComment.DocBlock)
   78 | ERROR   | [ ] Class property $no_operator should use lowerCamel naming without underscores
      |         |     (Drupal.NamingConventions.ValidVariableName.LowerCamelName)
   78 | ERROR   | [ ] The var keyword must not be used to declare a property (PSR2.Classes.PropertyDeclaration.VarUsed)
   78 | ERROR   | [ ] Visibility must be declared on property "$no_operator" (PSR2.Classes.PropertyDeclaration.ScopeMissing)
   80 | ERROR   | [ ] Missing short description in doc comment (Drupal.Commenting.DocComment.MissingShort)
   80 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
      |         |     (Drupal.Commenting.InlineComment.DocBlock)
   84 | ERROR   | [ ] Class property $always_required should use lowerCamel naming without underscores
      |         |     (Drupal.NamingConventions.ValidVariableName.LowerCamelName)
   84 | ERROR   | [ ] The var keyword must not be used to declare a property (PSR2.Classes.PropertyDeclaration.VarUsed)
   84 | ERROR   | [ ] Visibility must be declared on property "$always_required" (PSR2.Classes.PropertyDeclaration.ScopeMissing)
  110 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
      |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines)
  120 | ERROR   | [x] Missing function doc comment (Drupal.Commenting.FunctionComment.Missing)
  138 | ERROR   | [x] The first index in a multi-value array must be on a new line
      |         |     (Squiz.Arrays.ArrayDeclaration.FirstIndexNoNewline)
  140 | ERROR   | [x] Closing parenthesis of array declaration must be on a new line
      |         |     (Squiz.Arrays.ArrayDeclaration.CloseBraceNewLine)
  172 | ERROR   | [x] Doc comment short description must end with a full stop (Drupal.Commenting.DocComment.ShortFullStop)
  181 | ERROR   | [x] Opening brace must be the last content on the line
      |         |     (Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace)
  181 | ERROR   | [x] There should be no white space after an opening "{" (Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace)
  181 | ERROR   | [x] There should be no white space before a closing "}" (Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace)
  181 | ERROR   | [x] Closing brace must be on a line by itself (Drupal.WhiteSpace.ScopeClosingBrace.Line)
  185 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
  194 | ERROR   | [ ] Public method name "FilterPluginBase::isAGroup" is not in lowerCamel format
      |         |     (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
  202 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
  243 | ERROR   | [x] Doc comment short description must end with a full stop (Drupal.Commenting.DocComment.ShortFullStop)
  257 | ERROR   | [x] Doc comment short description must end with a full stop (Drupal.Commenting.DocComment.ShortFullStop)
  307 | ERROR   | [x] Doc comment short description must end with a full stop (Drupal.Commenting.DocComment.ShortFullStop)
  307 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
  309 | ERROR   | [x] Opening brace must be the last content on the line
      |         |     (Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace)
  309 | ERROR   | [x] There should be no white space after an opening "{" (Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace)
  309 | ERROR   | [x] There should be no white space before a closing "}" (Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace)
  309 | ERROR   | [x] Closing brace must be on a line by itself (Drupal.WhiteSpace.ScopeClosingBrace.Line)
  314 | ERROR   | [x] There should be no white space after an opening "{" (Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace)
  314 | ERROR   | [x] There should be no white space before a closing "}" (Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace)
  318 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
  320 | ERROR   | [x] There should be no white space after an opening "{" (Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace)
  320 | ERROR   | [x] There should be no white space before a closing "}" (Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace)
  348 | ERROR   | [x] There should be no white space after an opening "{" (Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace)
  348 | ERROR   | [x] There should be no white space before a closing "}" (Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace)
  352 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
  354 | ERROR   | [x] There should be no white space after an opening "{" (Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace)
  354 | ERROR   | [x] There should be no white space before a closing "}" (Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace)
  551 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 7 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
  643 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own
      |         |     line (Drupal.Array.Array.LongLineDeclaration)
  657 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own
      |         |     line (Drupal.Array.Array.LongLineDeclaration)
  688 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own
      |         |     line (Drupal.Array.Array.LongLineDeclaration)
  690 | WARNING | [x] There must be no blank line following an inline comment (Drupal.Commenting.InlineComment.SpacingAfter)
  702 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own
      |         |     line (Drupal.Array.Array.LongLineDeclaration)
  711 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own
      |         |     line (Drupal.Array.Array.LongLineDeclaration)
  712 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own
      |         |     line (Drupal.Array.Array.LongLineDeclaration)
  753 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
  797 | ERROR   | [x] Doc comment short description must end with a full stop (Drupal.Commenting.DocComment.ShortFullStop)
  845 | ERROR   | [x] Doc comment short description must end with a full stop (Drupal.Commenting.DocComment.ShortFullStop)
  845 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
  853 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters (Drupal.Files.LineLength.TooLong)
  956 | WARNING | [ ] Line exceeds 80 characters; contains 139 characters (Drupal.Files.LineLength.TooLong)
  956 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, colons, or question marks
      |         |     (Drupal.Commenting.InlineComment.InvalidEndChar)
  956 | ERROR   | [x] Comments may not appear after statements (Drupal.Commenting.PostStatementComment.Found)
  966 | ERROR   | [ ] If the line declaring an array spans longer than 80 characters, each element should be broken into its own
      |         |     line (Drupal.Array.Array.LongLineDeclaration)
  970 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters (Drupal.Files.LineLength.TooLong)
  972 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters (Drupal.Files.LineLength.TooLong)
  972 | WARNING | [x] There must be no blank line following an inline comment (Drupal.Commenting.InlineComment.SpacingAfter)
  972 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, colons, or question marks
      |         |     (Drupal.Commenting.InlineComment.InvalidEndChar)
 1060 | WARNING | [x] A comma should follow the last multiline array item. Found: ) (Drupal.Array.Array.CommaLastItem)
 1069 | WARNING | [x] A comma should follow the last multiline array item. Found: ) (Drupal.Array.Array.CommaLastItem)
 1124 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
 1148 | WARNING | [ ] Line exceeds 80 characters; contains 99 characters (Drupal.Files.LineLength.TooLong)
 1164 | ERROR   | [ ] More than 2 empty lines are not allowed (Drupal.WhiteSpace.EmptyLines.EmptyLines)
 1191 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
 1204 | ERROR   | [ ] Function return type is not void, but function is returning void here
      |         |     (Drupal.Commenting.FunctionComment.InvalidReturnNotVoid)
 1234 | ERROR   | [x] You must use "/**" style comments for a function comment (Drupal.Commenting.FunctionComment.WrongStyle)
 1253 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters (Drupal.Files.LineLength.TooLong)
 1271 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
 1275 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 1282 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
 1291 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
 1329 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
      |         |     (Drupal.Commenting.DocComment.ShortSingleLine)
 1335 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
      |         |     (Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines)
 1374 | ERROR   | [x] Missing function doc comment (Drupal.Commenting.FunctionComment.Missing)
 1395 | ERROR   | [x] Inline comments must start with a capital letter (Drupal.Commenting.InlineComment.NotCapital)
 1446 | ERROR   | [ ] Return comment must be on the next line (Drupal.Commenting.FunctionComment.MissingReturnComment)
 1448 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 1449 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 5 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 1450 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 1452 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 1461 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 1462 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 45 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------
snehi’s picture

Assigned: Unassigned » snehi
snehi’s picture

Assigned: snehi » Unassigned
jordanpagewhite’s picture

Assigned: Unassigned » jordanpagewhite
jordanpagewhite’s picture

Assigned: jordanpagewhite » Unassigned
iAmSupeRAN’s picture

Assigned: Unassigned » iAmSupeRAN

I'm fixing this

naveenvalecha’s picture

jhodgdon’s picture

Status: Active » Closed (won't fix)

Thanks for the issue, but please read the new-ish Issue Scope guidelines:
https://www.drupal.org/core/scope

Rather than issues organized like "fix all of the coding standards problems in this one file", we want to have issues organized like "Fix all of this type of coding standards problem in all of Core" (with sub-issues as necessary).

So I'm closing this as Won't Fix. There are issues that are working on some of these coding standards issues in Core right now; you can start others if they don't exist yet. See links in that document.