Problem/Motivation

The standard (white space) for chained method calls has not been decided yet. See #1516460: Define coding standard for chained method calls.

Consider LocaleLookupTest.php

    $this->storage->expects($this->any())
      ->method('findTranslation')
      ->will($this->returnCallback(function ($argument) use ($translations) {
        if (isset($translations[$argument['language']][$argument['source']])) {
          return (object) array('translation' => $translations[$argument['language']][$argument['source']]);
        }
        return TRUE;
      }));

Gives errors like:
167 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6

Proposed resolution

Make white space errors for lines part of chained object oriented calls warnings instead of errors, until #1516460: Define coding standard for chained method calls is decided.

Remaining tasks

User interface changes

No.

API changes

No.

Comments

klausi’s picture

Status: Active » Fixed

Committed a fix, thanks for reporting!

  • klausi committed cbb3fa0 on 8.x-2.x
    Issue #2288851 : Fixed false indentation errors when chained method...

Status: Fixed » Closed (fixed)

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