ContentHandler: Fix a typo
[lhc/web/wiklou.git] / includes / content / ContentHandler.php
index 9c20195..2de8408 100644 (file)
@@ -319,7 +319,7 @@ abstract class ContentHandler {
                        wfRunHooks( 'ContentHandlerForModelID', array( $modelId, &$handler ) );
 
                        if ( $handler === null ) {
-                               throw new MWException( "No handler for model '$modelId'' registered in \$wgContentHandlers" );
+                               throw new MWException( "No handler for model '$modelId' registered in \$wgContentHandlers" );
                        }
 
                        if ( !( $handler instanceof ContentHandler ) ) {
@@ -1060,7 +1060,7 @@ abstract class ContentHandler {
                                        if ( isset( $handler[1] ) ) {
                                                $info .= '::' . $handler[1];
                                        }
-                               } else if ( is_object( $handler ) ) {
+                               } elseif ( is_object( $handler ) ) {
                                        $info = get_class( $handler[0] );
                                        $info .= '::on' . $event;
                                } else {
@@ -1086,8 +1086,8 @@ abstract class ContentHandler {
                                $contentObjects[$k] = $v;
 
                                $v = $v->serialize();
-                               $contentTexts[ $k ] = $v;
-                               $args[ $k ] = $v;
+                               $contentTexts[$k] = $v;
+                               $args[$k] = $v;
                        }
                }
 
@@ -1098,7 +1098,7 @@ abstract class ContentHandler {
                foreach ( $contentTexts as $k => $orig ) {
                        /* @var Content $content */
 
-                       $modified = $args[ $k ];
+                       $modified = $args[$k];
                        $content = $contentObjects[$k];
 
                        if ( $modified !== $orig ) {
@@ -1106,7 +1106,7 @@ abstract class ContentHandler {
                                $content = $content->getContentHandler()->unserializeContent( $modified );
                        }
 
-                       $args[ $k ] = $content;
+                       $args[$k] = $content;
                }
 
                return $ok;