php-collective / code-sniffer

This sniffer package builds on top of PSR-2/12 and ships with a lot of additional fixers on top.
MIT License
5 stars 0 forks source link

Sniff for whitespace around class const usage #18

Closed dereuromark closed 4 weeks ago

dereuromark commented 4 weeks ago

Ref of https://github.com/slevomat/coding-standard/issues/1699

In the code I saw this the other day

'joinType' => $filter ? SelectQuery::JOIN_TYPE_INNER : SelectQuery ::JOIN_TYPE_LEFT,

I noticed that none of our sniffs fixed the whitespace after the 2nd SelectQuery.

Is there an existing sniff here yet, doesnt look like it I would expect this to be part of the psr standards to not have whitespace between the classname and the :: as well as afterwards before the class constant etc.

dereuromark commented 4 weeks ago

PhpCollective.WhiteSpace.ObjectAttributeSpacing.TooMany already covers this.