Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ protected function processFunctionCall(File $phpcsFile, int $stackPtr, array $pa
}
}

/**
* Check before multiline call
*
* @param File $phpcsFile
* @param int $stackPtr
*/
private function checkBeforeCall(File $phpcsFile, int $stackPtr): void
{
$tokens = $phpcsFile->getTokens();
Expand Down Expand Up @@ -89,6 +83,7 @@ private function checkBeforeCall(File $phpcsFile, int $stackPtr): void
T_OPEN_SHORT_ARRAY,
T_COLON,
T_ATTRIBUTE_END,
T_RETURN
];

if ($diffLines < 2 && !\in_array($prevToken['code'], $possiblePrevTokens, true)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

$res = 23;

$object
->child()
->method(\sprintf(
Expand Down Expand Up @@ -64,4 +66,12 @@ function some(\DOMDocument $dom): string
])]
function withAttributes()
{
$object = new \StdClass();

return $object
->some([
'bla' => 'bla',
'foo' => 'foo',
])
->some2();
}