* @since 1.18
*/
public static function register( $name, $callback ) {
- if ( !isset( self::$handlers[$name] ) ) {
- self::$handlers[$name] = [];
- }
-
self::$handlers[$name][] = $callback;
}
*
* @since 1.21
* @throws MWException If not in testing mode.
+ * @codeCoverageIgnore
*/
public static function clear( $name ) {
if ( !defined( 'MW_PHPUNIT_TEST' ) && !defined( 'MW_PARSER_TEST' ) ) {