...
- which PHP_CodeSniffer inspections are failing
- what are exact test case
- what we can do about it
Problematic inspections
Inspection name | Error message | Example code | Problem description | Solved | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A opeator statement must be followed by a single space |
| Inspections should check, that operands are separated from operators by a single space.
However symbols "=" and "&" are operators on it's own ("equals" and "bitwise and") and probably during syntax check inspection isn't aware, that together ("=&") they represent assigning a value by reference. |
| ||||||||||||||||||||||||||
A comma should follow the last multiline array item. Found: /*'k2',*/ |
| | Inspection forces usage of trailing comma after last array element. However in this example commented out code is present before array declaration end, which makes inspection go crazy and not notice actual comma after 'k1' code. |
| |||||||||||||||||||||||||