Skip to content
Snippets Groups Projects
Unverified Commit acc55a98 authored by nLightened Development LLC's avatar nLightened Development LLC Committed by GitHub
Browse files

fix(ScopeIndent): Support PHP attributes (#3461148 by nicxvan)

parent 0fd66d39
No related branches found
No related tags found
No related merge requests found
......@@ -962,6 +962,7 @@ class ScopeIndentSniff implements Sniff
T_OPEN_CURLY_BRACKET,
T_COLON,
T_OPEN_TAG,
T_ATTRIBUTE_END,
]
) === false
) {
......
......@@ -203,3 +203,22 @@ $has_index_value_scalar['foo']['value'] = array (
EXPECTED
],
];
/**
* Test PHP attributes.
*/
class TestPhpAttributes {
/**
* Bar property.
*/
#[NotBlank]
private bool $bar;
/**
* Tests method with PHP attribute and docblock.
*/
#[\ReturnTypeWillChange]
public function attributes(): void {}
}
......@@ -215,3 +215,22 @@ $has_index_value_scalar['foo']['value'] = array (
EXPECTED
],
];
/**
* Test PHP attributes.
*/
class TestPhpAttributes {
/**
* Bar property.
*/
#[NotBlank]
private bool $bar;
/**
* Tests method with PHP attribute and docblock.
*/
#[\ReturnTypeWillChange]
public function attributes(): void {}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment