Commit 6ef59bc
authored
chore(capabilities): drop the unreachable duplicates in denial_reason() (#152)
The function ended with verbatim copies of two branches it had already
run. Both conditions are character-identical to the earlier ones, the
earlier ones always return, and nothing between them touches $required,
$gate, or any state either condition reads — so the copies could never
execute.
Worth deleting rather than ignoring, because the duplicate tier block is
a WORSE version of the one that runs: it omits the
saddle_insufficient_scope branch. If it ever became reachable it would
send an OAuth-scope-limited agent to raise the site's access level, which
is the wrong screen — the exact bug #108 fixed. A stale copy of a
corrected code path sitting next to the corrected one is how that comes
back.
No behaviour change and no new test: unreachable code cannot change
behaviour, and the proof nothing moved is capabilities-test.php's
existing gate-ordering coverage staying green. 612 tests, 0 lint errors.
Closes #1511 parent dc552e0 commit 6ef59bc
1 file changed
Lines changed: 0 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | 509 | | |
529 | 510 | | |
530 | 511 | | |
| |||
0 commit comments