Commit 57d9e89
Generic/ByteOrderMark: small performance improvement
The BOM character must be the first character of the file. This means
that this sniff only needs to check the file once, but its code
was being executed for each occurrence of the T_INLINE_HTML token.
This commit changes the sniff code to return the number of tokens in all
of its exit points to ensure that PHPCS executes it just a single time
per file.1 parent 29cf01e commit 57d9e89
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
0 commit comments