Comment Indentation #1349
Unanswered
earthiverse
asked this question in
Q&A
Replies: 1 comment
-
|
Adding exact is a bit closer, but it caused other problem and is apparently not recommended <!-- PSR12 ignores comment indent, but we prefer not to -->
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="exact" value="true"/>
<!-- NOTE: This array is intentionally left empty -->
<property name="ignoreIndentationTokens" type="array"/>
</properties>
</rule> public function getInputSpecification(): array
{
// 1
// 2
// 3
// 4
return [
// 1
// 2
// 3
// 4
// 5
// 6
'name' => 'name',
'required' => true, // If not provided, we add one in setData()
'filters' => [
['name' => StringTrim::class],
['name' => ToNull::class],
['name' => PathToFilenameFilter::class],
['name' => SlugifyFilter::class],
[
'name' => FilterCallback::class,
'options' => [
'callback' => static fn($value) => empty($value)
? FilesystemUtility::generateFilename() : $value,
],
],
],
];
// 1
// 2
// 3
// 4
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wish to align comments to the indentation level.
With my current ruleset, these comments stay in place:
By adding
It formats as
This is an improvement, but the comments in the array, as well as indented comments later stay indented.
Does anyone know how I can fix these?
Beta Was this translation helpful? Give feedback.
All reactions