resources: Collapse all jQuery UI modules into one deprecated mega-module
[lhc/web/wiklou.git] / includes / Revision / MainSlotRoleHandler.php
index 6c6fdd6..0139103 100644 (file)
@@ -86,10 +86,8 @@ class MainSlotRoleHandler extends SlotRoleHandler {
 
                // Hook can determine default model
                $title = Title::newFromLinkTarget( $page );
-               if ( !Hooks::run( 'ContentHandlerDefaultModelFor', [ $title, &$model ] ) ) {
-                       if ( !is_null( $model ) ) {
-                               return $model;
-                       }
+               if ( !Hooks::run( 'ContentHandlerDefaultModelFor', [ $title, &$model ] ) && !is_null( $model ) ) {
+                       return $model;
                }
 
                // Could this page contain code based on the title?
@@ -120,7 +118,7 @@ class MainSlotRoleHandler extends SlotRoleHandler {
                                case 'json':
                                        return CONTENT_MODEL_JSON;
                                default:
-                                       return is_null( $model ) ? CONTENT_MODEL_TEXT : $model;
+                                       return $model ?? CONTENT_MODEL_TEXT;
                        }
                }