While reading the base class description for ArgumentPluginBase

I was distracted by the crazy paving indentation. It got in the way of my understanding of what is going on, I don't want this for the next reader.

This is a highly focused issue to fix spacing ...

So is hopefully a quick to review issue.

ArgumentPluginBase is over 1000 lines long so a single issue to fix all the cs issues would be too much.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

martin107 created an issue. See original summary.

Sonal.Sangale’s picture

Assigned: Unassigned » Sonal.Sangale
Sonal.Sangale’s picture

Status: Needs review » Needs work

The last submitted patch, 3: fixing_indentation-2724297-3.patch, failed testing.

markdorison’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: fixing_indentation-2724297-3.patch, failed testing.

martin107’s picture

jhodgdon’s picture

Thanks! Better than the original, but still needs a bit of work:

  1. +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
    @@ -38,20 +38,18 @@
    + *   the displayed output. For example, for the node: nid argument,
    + *   the argument itself is the nid, but node.title is displayed.
    

    Besides fixing the indentation, these lines should be rewrapped to as close to 80 characters as possible, without going over.

  2. +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
    @@ -38,20 +38,18 @@
    + *   which can have "no term", this is the string which will be displayed for ¶
    

    This line has an extra space at the end.

  3. +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
    @@ -38,20 +38,18 @@
    + *   which validator is available to just one. Use the validator ID. ¶
    

    extra space at end.

er.pushpinderrana’s picture

Status: Needs work » Needs review
FileSize
2 KB
1.57 KB

Incorporated above suggested changes.

jhodgdon’s picture

Status: Needs review » Needs work

Much better, thanks!

Still one wrapping problem:

+++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
@@ -38,20 +38,18 @@
+ *   validator is available to just one. Use the validator ID.
+ *   This probably should not be used at all, and may disappear or change.

These two lines should still be wrapped together.

er.pushpinderrana’s picture

Status: Needs work » Needs review
FileSize
2.08 KB
1.12 KB

Thank you! Please review again.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, this latest patch fixes the problem in the issue summary.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 11: fixing_indentation-2724297-11.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

Unrelated fail.

xjm’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Related issues: +#2571965: [meta] Fix PHP coding standards in core

Thank you for your work on cleaning up Drupal core's code style!

In order to fix core coding standards in a maintainable way, all our coding standards issues should be done on a per-rule basis across all of core, rather than fixing standards in individual modules or files. We should also separate fixes where we need to write new documentation from fixes where we need to correct existing standards. This all should be done as part of #2571965: [meta] Fix PHP coding standards in core. A good place to start is the child issues of #2572645: [Meta] Fix 'Drupal.Commenting.FunctionComment' coding standard.

For this issue, I did not find an existing rule; if there is not one then we will start by creating it in the Coder project.

For background information on why we usually will not commit coding standards fixes that aren't scoped in that way, see the core issue scope guidelines, especially the note about coding standards cleanups. That document also includes numerous suggestions for scoping issues including documentation coding standards cleanups.

Contributing to the overall plan above will help ensure that your fixes for core's coding standards remain in core the long term.