Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistArrayValueXHPASTLinterRule.php
Context not available. | |||||
foreach ($array_values as $value) { | foreach ($array_values as $value) { | ||||
list($before, $after) = $value->getSurroundingNonsemanticTokens(); | list($before, $after) = $value->getSurroundingNonsemanticTokens(); | ||||
if (strpos(implode('', mpull($before, 'getValue')), "\n") === false) { | if (@strpos(implode('', mpull($before, 'getValue')), "\n") === false) { | ||||
if (last($before) && last($before)->isAnyWhitespace()) { | if (last($before) && last($before)->isAnyWhitespace()) { | ||||
$token = last($before); | $token = last($before); | ||||
$replacement = "\n".$value->getIndentation(); | $replacement = "\n".$value->getIndentation(); | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0