private $mDebug = false;
/** @var array */
- private $metadata = array();
- private $languages = array();
- private $languagePrefixes = array();
+ private $metadata = [];
+ private $languages = [];
+ private $languagePrefixes = [];
/**
* Constructor
} elseif ( $this->reader->namespaceURI == self::NS_SVG
&& $this->reader->nodeType == XMLReader::ELEMENT
) {
-
$sysLang = $this->reader->getAttribute( 'systemLanguage' );
if ( !is_null( $sysLang ) && $sysLang !== '' ) {
// See http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute
}
}
- // @todo FIXME: Unused, remove?
- private function warn( $data ) {
- wfDebug( "SVGReader: $data\n" );
- }
-
- // @todo FIXME: Unused, remove?
- private function notice( $data ) {
- wfDebug( "SVGReader WARN: $data\n" );
- }
-
/**
* Parse the attributes of an SVG element
*
* @return float Length in pixels
*/
static function scaleSVGUnit( $length, $viewportSize = 512 ) {
- static $unitLength = array(
+ static $unitLength = [
'px' => 1.0,
'pt' => 1.25,
'pc' => 15.0,
'em' => 16.0, // fake it?
'ex' => 12.0, // fake it?
'' => 1.0, // "User units" pixels by default
- );
- $matches = array();
+ ];
+ $matches = [];
if ( preg_match( '/^\s*(\d+(?:\.\d+)?)(em|ex|px|pt|pc|cm|mm|in|%|)\s*$/', $length, $matches ) ) {
$length = floatval( $matches[1] );
$unit = $matches[2];