Commit 2956b69
committed
Generic/DisallowShortOpenTag: prevent fixer conflict (#835)
The original fixer conflict which inspired this fix can be reproduced via:
```bash
phpcbf -ps ./src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.19.inc --report=full,source --suffix=.fixed --standard=Squiz
```
What it basically comes down to is that this sniff would replace the `<?=` with `<?php echo`, even in case of a parse error, which would then cause problems for other sniffs.
Fixed now by ignoring this particular parse error.
Includes test.
Note: this PR will be most straight-forward to review while ignoring whitespace changes.1 parent 62e6430 commit 2956b69
File tree
2 files changed
+18
-12
lines changed- src/Standards/Generic
- Sniffs/PHP
- Tests/PHP
2 files changed
+18
-12
lines changedLines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments