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 ) ) {
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 {
$contentObjects[$k] = $v;
$v = $v->serialize();
- $contentTexts[ $k ] = $v;
- $args[ $k ] = $v;
+ $contentTexts[$k] = $v;
+ $args[$k] = $v;
}
}
foreach ( $contentTexts as $k => $orig ) {
/* @var Content $content */
- $modified = $args[ $k ];
+ $modified = $args[$k];
$content = $contentObjects[$k];
if ( $modified !== $orig ) {
$content = $content->getContentHandler()->unserializeContent( $modified );
}
- $args[ $k ] = $content;
+ $args[$k] = $content;
}
return $ok;