Fork me on GitHub
a Sensio Labs Product

Exceptional Exception (v3.93.1) edition

Rule attribute_block_no_spaces

Remove spaces before and after the attributes block.

Examples

Example #1

--- Original
+++ New
 <?php
 class User
 {
-    #[
-        ApiProperty(identifier: true)
-    ]
+    #[ApiProperty(identifier: true)]
     private string $name;
 }

Rule sets

The rule is part of the following rule sets:

References

The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.