use MediaWiki\MediaWikiServices;
/**
- * @defgroup Actions Action done on pages
+ * @defgroup Actions Actions
*/
/**
if ( !class_exists( $classOrCallable ) ) {
return false;
}
- $obj = new $classOrCallable( $page, $context );
- return $obj;
+ return new $classOrCallable( $page, $context );
}
if ( is_callable( $classOrCallable ) ) {
} else {
$actionName = 'view';
}
- } elseif ( $actionName == 'editredlink' ) {
+ } elseif ( $actionName === 'editredlink' ) {
$actionName = 'edit';
}
* Get a Message object with context set
* Parameters are the same as wfMessage()
*
+ * @param string|string[]|MessageSpecifier $key
+ * @param mixed ...$params
* @return Message
*/
- final public function msg( $key ) {
- $params = func_get_args();
- return $this->getContext()->msg( ...$params );
+ final public function msg( $key, ...$params ) {
+ return $this->getContext()->msg( $key, ...$params );
}
/**
*/
protected function setHeaders() {
$out = $this->getOutput();
- $out->setRobotPolicy( "noindex,nofollow" );
+ $out->setRobotPolicy( 'noindex,nofollow' );
$out->setPageTitle( $this->getPageTitle() );
$out->setSubtitle( $this->getDescription() );
$out->setArticleRelated( true );