context: Make the getSkin() fallback logic more explicit
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 29 Jul 2019 22:42:57 +0000 (23:42 +0100)
committerKrinkle <krinklemail@gmail.com>
Mon, 29 Jul 2019 23:42:23 +0000 (23:42 +0000)
commit2058d79330a396c5d79afff5b9ce87dd3db32ee2
tree3dc175beebabcbacd77bedb8b9227076cab58865
parent8da05da2976314d5493abf112e369d0501c6d156
context: Make the getSkin() fallback logic more explicit

Previously the first two post-hook checks where mutually exclusive
and the fallback was generic (not conditional) which means we
would also allow the first two conditions to succeed in a way that
leaves $this->skin as null.

Aside from that not being possible right now, it also duplicates a
null check in two places, which isn't ideal.

Codify that the first two blocks always result in $this->skin
being assigned non-null by using an 'else' branch instead of another
generic check.

Change-Id: I7986684bf1bb2daad3aaddfbcd2ca02e652f78c2
includes/context/RequestContext.php