Skip to content

Commit c5d60e6

Browse files
committed
Tweak language around compound attributes.
1 parent b7ab5ab commit c5d60e6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spec.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1276,11 +1276,12 @@ function allowed()
12761276
compliant
12771277
nowdoc
12781278
COMPLIANT;
1279+
}
12791280
```
12801281

12811282
## 11. Attributes
12821283

1283-
### 12.1 Basics
1284+
### 11.1 Basics
12841285

12851286
Attribute names must immediately follow the opening attribute block indicator `#[` with no space.
12861287

@@ -1289,7 +1290,7 @@ If an attribute has no arguments, the `()` MUST be omitted.
12891290
The closing attribute block indicator `]` MUST follow the last character of the attribute name or the closing `)` of
12901291
its argument list, with no preceding space.
12911292

1292-
### 12.2 Placement
1293+
### 11.2 Placement
12931294

12941295
Attributes on classes, methods, functions, constants and properties MUST
12951296
be placed on their own line, immediately prior to the structure being described.
@@ -1306,10 +1307,10 @@ between the docblock and attributes, or the attributes and the structure.
13061307
If two separate attribute blocks (denoted by separate `#[]` markers) are used in a multi-line context,
13071308
they MUST be on separate lines with no blank lines between them.
13081309

1309-
### 12.3 Compound attributes
1310+
### 11.3 Compound attributes
13101311

13111312
Multiple attributes MAY be placed in the same attribute block (`#[]`) if and only if the entire block is listed on a
1312-
single line. They must be separated by a comma with a space following but no space preceding. If the attribute list
1313+
single line and each attribute is reasonably short. They MUST be separated by a comma with a space following but no space preceding. If the attribute list
13131314
is split into multiple lines for any reason, then the attributes MUST be placed in separate attribute blocks.
13141315
Those blocks may themselves contain multiple attributes provided this rule is respected.
13151316

@@ -1318,7 +1319,7 @@ If an attribute's argument list is split into multiple lines for any reason, the
13181319
* The attribute MUST be the only one in its attribute block.
13191320
* The attribute arguments MUST follow the same rules as defined for multiline function calls.
13201321
1321-
### 12.4 Example
1322+
### 11.4 Example
13221323
13231324
The following is an example of valid attribute usage.
13241325

0 commit comments

Comments
 (0)