Skip to content

Files

Latest commit

 

History

History
31 lines (22 loc) · 959 Bytes

SlevomatCodingStandard.Attributes.AttributesOrder.md

File metadata and controls

31 lines (22 loc) · 959 Bytes

Pattern: Wrong attributes order

Issue: -

Description

Requires order of attributes. When more attributes are in one #[], e.g. #[One, Two], the first attribute name is used to resolve the order.

This rule provides the following settings:

  • order: required order of attributes. Supports prefixes, eg. ORM\, and mask , eg. AppAssert*.
  • orderAlphabetically: order attributes alphabetically. Boolean value, default false.

Only one order can be set.

<rule ref="SlevomatCodingStandard.Attributes.AttributesOrder">
	<properties>
		<property name="order" type="array">
			<element value="ORM\Table"/>
			<element value="ORM\"/>
			<element value="One"/>
			<element value="Two"/>
		</property>
	</properties>
</rule>

Further Reading