Skip to content

Commit

Permalink
Fixed indent check when function is called inside an array declaratio…
Browse files Browse the repository at this point in the history
…n (ref #2647)
  • Loading branch information
gsherwood committed Oct 13, 2019
1 parent da72d36 commit a24f6d4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ public function processMultiLineCall(File $phpcsFile, $stackPtr, $openBracket, $
$foundFunctionIndent = 0;
if ($first !== false) {
if ($tokens[$first]['code'] === T_INLINE_HTML
|| $tokens[$first]['code'] === T_CONSTANT_ENCAPSED_STRING
|| ($tokens[$first]['code'] === T_CONSTANT_ENCAPSED_STRING
&& $tokens[($first - 1)]['code'] === T_CONSTANT_ENCAPSED_STRING)
) {
$trimmed = ltrim($tokens[$first]['content']);
if ($trimmed === '') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,3 +457,10 @@ WHERE f IN(" . implode(
) . ")";
}
}

$notices = array(
'index' => sprintf(
translation_function('a text string with %s placeholder'),
'replacement'
),
);
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,10 @@ WHERE f IN(" . implode(
) . ")";
}
}

$notices = array(
'index' => sprintf(
translation_function('a text string with %s placeholder'),
'replacement'
),
);
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public function getErrorList($testFile='FunctionCallSignatureUnitTest.inc')
455 => 1,
456 => 1,
457 => 1,
464 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit a24f6d4

Please sign in to comment.