Hooks::isSupportedEditPage: Re-format to make the logic clearer

Change-Id: I8959f1bc4c632fb80fc02374d6ecfc94ef06d9fc
This commit is contained in:
James D. Forrester 2020-02-12 15:39:55 -08:00
parent b7b526a8a5
commit eb02880f20

View file

@ -225,8 +225,10 @@ class VisualEditorHooks {
* @return bool
*/
private static function isSupportedEditPage( Title $title, User $user, WebRequest $req ) {
if ( $req->getVal( 'action' ) !== 'edit' || !MediaWikiServices::getInstance()
->getPermissionManager()->quickUserCan( 'edit', $user, $title ) ) {
if (
$req->getVal( 'action' ) !== 'edit' ||
!MediaWikiServices::getInstance()->getPermissionManager()->quickUserCan( 'edit', $user, $title )
) {
return false;
}