Update formatting on API classes
[lhc/web/wiklou.git] / includes / context / DerivativeContext.php
index d4caf05..fd9bf96 100644 (file)
@@ -100,7 +100,10 @@ class DerivativeContext extends ContextSource {
         *
         * @param Title $t
         */
-       public function setTitle( Title $t ) {
+       public function setTitle( $t ) {
+               if ( $t !== null && !$t instanceof Title ) {
+                       throw new MWException( __METHOD__ . " expects an instance of Title" );
+               }
                $this->title = $t;
        }