X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FPreprocessor_DOM.php;h=81243f3c6d69db62a9d674bc1903a570021bc317;hb=51e40a712f2f2eb57216b26a16c91d14f74d5cf2;hp=5368125f35606becfb9df03a8610c88e0439524b;hpb=7040be4f72b46a0052f8896ef462d8b98f45e157;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index 5368125f35..81243f3c6d 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -24,9 +24,8 @@ /** * @ingroup Parser */ -// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps +// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps class Preprocessor_DOM extends Preprocessor { - // @codingStandardsIgnoreEnd /** * @var Parser @@ -87,9 +86,9 @@ class Preprocessor_DOM extends Preprocessor { $xml .= ""; $dom = new DOMDocument(); - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $result = $dom->loadXML( $xml ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( !$result ) { // Try running the XML through UtfNormal to get rid of invalid characters $xml = UtfNormal\Validator::cleanUp( $xml ); @@ -164,9 +163,9 @@ class Preprocessor_DOM extends Preprocessor { } $dom = new DOMDocument; - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $result = $dom->loadXML( $xml ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( !$result ) { // Try running the XML through UtfNormal to get rid of invalid characters $xml = UtfNormal\Validator::cleanUp( $xml ); @@ -824,7 +823,7 @@ class PPDStack { */ public $top; public $out; - public $elementClass = 'PPDStackElement'; + public $elementClass = PPDStackElement::class; public static $false = false; @@ -932,7 +931,7 @@ class PPDStackElement { */ public $lineStart; - public $partClass = 'PPDPart'; + public $partClass = PPDPart::class; public function __construct( $data = [] ) { $class = $this->partClass; @@ -1024,9 +1023,8 @@ class PPDPart { * An expansion frame, used as a context to expand the result of preprocessToObj() * @ingroup Parser */ -// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps +// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps class PPFrame_DOM implements PPFrame { - // @codingStandardsIgnoreEnd /** * @var Preprocessor @@ -1642,9 +1640,8 @@ class PPFrame_DOM implements PPFrame { * Expansion frame with template arguments * @ingroup Parser */ -// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps +// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps class PPTemplateFrame_DOM extends PPFrame_DOM { - // @codingStandardsIgnoreEnd public $numberedArgs, $namedArgs; @@ -1821,9 +1818,8 @@ class PPTemplateFrame_DOM extends PPFrame_DOM { * Expansion frame with custom arguments * @ingroup Parser */ -// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps +// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps class PPCustomFrame_DOM extends PPFrame_DOM { - // @codingStandardsIgnoreEnd public $args; @@ -1874,9 +1870,8 @@ class PPCustomFrame_DOM extends PPFrame_DOM { /** * @ingroup Parser */ -// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps +// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps class PPNode_DOM implements PPNode { - // @codingStandardsIgnoreEnd /** * @var DOMElement