Commit 54a05bc
Generic/CyclomaticComplexity: ensure the sniff bails if
Quoting @jrfnl: "Only checking for the scope_opener, when
accessing/using both the scope_opener and scope_closer indexes, is
probably fine in practical terms. However, the part of the code base
which sets these indexes is not sufficiently covered by tests, nor does
it document that those indexes will only be set if both can be set, so
there may be edge case exceptions" (#684 (comment)).
The sniff was already working fine before this change. Checking if
`scope_closer` is just an extra precaution to err on the side of caution.scope_closer is not set1 parent 2371b0a commit 54a05bc
File tree
1 file changed
+1
-1
lines changed- src/Standards/Generic/Sniffs/Metrics
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
0 commit comments