Skip to content

Commit f5913cc

Browse files
committed
PHPCS native ruleset: don't require exact array double arrow alignment
When the item with the _longest_ array key is removed, WPCS requires the double arrows in the whole array to be re-aligned. Setting the [`exact` property](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#array-alignment-allow-non-exact-alignment) to `false` removes this requirement and allows for cleaner diffs when this happens. As PR 1547 removed a large number of items from the `Sniff::$autoEscapedFunctions` array, PHPCS was currently throwing warnings about the WPCS codebase. This small tweaks gets rid of those, while still allowing `phpcbf` to fix them up if so desired.
1 parent 1e920a4 commit f5913cc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
2727
<properties>
2828
<property name="alignMultilineItems" value="!=100"/>
29+
<property name="exact" value="false" phpcs-only="true"/>
2930
</properties>
3031
</rule>
3132

0 commit comments

Comments
 (0)