diff --git a/wiki/Customisable-Sniff-Properties.md b/wiki/Customisable-Sniff-Properties.md index 9ee7e9d..b1feb47 100644 --- a/wiki/Customisable-Sniff-Properties.md +++ b/wiki/Customisable-Sniff-Properties.md @@ -1096,12 +1096,43 @@ This sniff checks the depth of imported namespaces inside compound use statement
+### PSR12.Operators.OperatorSpacing + +| Property Name | Type | Default | Available Since | +| ------------- | ------ | ------- | --------------- | +| perCompatible | string | 1.0 | 4.1.0 | + +This sniff ensures there is at least one space before and after an operator as per [PSR 12](https://www.php-fig.org/psr/psr-12/)/PER Coding Style 1.0. + +As of [PER Coding Style 3.0](https://github.com/php-fig/per-coding-style/blob/3.0.0/spec.md), the spacing requirements for the pipe operator in a multi-`catch` condition have changed to "no spaces around the operator". +By setting the `perCompatible` property to `'3.0'`or higher, the behaviour of the sniff will reflect the changed PER requirements for multi-catch `|` operators. + +```xml +