Problem/Motivation

Part of #2571965: [meta] Fix PHP coding standards in core. Add Drupal.Functions.FunctionDeclaration.SpaceAfter and Drupal.Functions.FunctionDeclaration.SpaceBeforeParenthesis to phpcs.xml.dist and fix reported errors...

FILE: ...core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 55 | ERROR | Expected exactly one space after the function keyword
----------------------------------------------------------------------


FILE: ...sites/drupal8alt.dev/core/lib/Drupal/Core/Template/Attribute.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 315 | ERROR | Expected exactly one space after the function keyword
----------------------------------------------------------------------


FILE: .../modules/breakpoint/tests/src/Kernel/BreakpointDiscoveryTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 94 | ERROR | Space before opening parenthesis of function definition
    |       | prohibited
----------------------------------------------------------------------


FILE: .../drupal8alt.dev/core/modules/node/src/Tests/NodeCreationTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 167 | ERROR | Space before opening parenthesis of function
     |       | definition prohibited
----------------------------------------------------------------------


FILE: ...ore/modules/views/src/Plugin/views/display/DisplayPluginBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 2265 | ERROR | Space before opening parenthesis of function
      |       | definition prohibited
----------------------------------------------------------------------

Proposed resolution

Fix it

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 2706669-2.patch3.88 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
3.88 KB
tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

phpcs passes in HEAD, fails with just the phpcs.xml.dist change (like in IS) and passes with full patch applied. Looks good!

  • effulgentsia committed 89712cf on 8.2.x
    Issue #2706669 by alexpott, tstoeckler: Fix Drupal.Functions....

  • effulgentsia committed 0f8b493 on 8.1.x
    Issue #2706669 by alexpott, tstoeckler: Fix Drupal.Functions....
webchick’s picture

Status: Reviewed & tested by the community » Fixed

effulgentsia and I co-reviewed this, and everything looks great. :)

Committed and pushed 8.2.x and cherry-picked to 8.1.x.

Status: Fixed » Closed (fixed)

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