}
if ( $this->charset !== 'UTF-8' ) {
// don't convert if already utf-8
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$content = iconv( $this->charset, 'UTF-8//IGNORE', $content );
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
}
// Ensure the XMP block does not have an xml doctype declaration, which
// Even with LIBXML_NOWARNING set, XMLReader::read gives a warning
// when parsing truncated XML, which causes unit tests to fail.
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
while ( $reader->read() ) {
if ( $reader->nodeType === XMLReader::ELEMENT ) {
// Reached the first element without hitting a doctype declaration
break;
}
}
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
if ( !is_null( $result ) ) {
return $result;
return;
}
- if ( count( $this->mode[0] ) === 0 ) {
+ if ( count( $this->mode ) === 0 ) {
// This should never ever happen and means
// there is a pretty major bug in this class.
throw new RuntimeException( 'Encountered end element with no mode' );
}
}
- // @codingStandardsIgnoreStart Generic.Files.LineLength
+ // phpcs:disable Generic.Files.LineLength
/**
* Process attributes.
* Simple values can be stored as either a tag or attribute
* @param array $attribs Array attribute=>value
* @throws RuntimeException
*/
- // @codingStandardsIgnoreEnd
+ // phpcs:enable
private function doAttribs( $attribs ) {
// first check for rdf:parseType attribute, as that can change
// how the attributes are interperted.