Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test file for PSR12.Operators.OperatorSpacing
The sniff has specific logic to avoid an out-of-bounds array offset access. Before now, there were no tests which covered this logic. This commit adds such a test. The sniff already handles this, so there are no changes required there. This particular omission was detected by infection/infection. ```diff src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php:104 [M] FalseValue @@ @@ } } else { // Skip partial files. - $checkAfter = false; + $checkAfter = true; } if ($checkBefore === true && $tokens[$stackPtr - 1]['code'] !== T_WHITESPACE) { $error = 'Expected at least 1 space before "%s"; 0 found'; ```
- Loading branch information