X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fsite%2FSiteExporter.php;h=01b838ef147e7ac9107d5626551e0fa6f5b30d62;hb=d8ce984944939c2fd17f4676fc6f6ccf1a1222e2;hp=294f1dba8206be7b0a834df2853a1eb86be1f1f9;hpb=415b31766677e190c13322742b4e42da1157538c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/site/SiteExporter.php b/includes/site/SiteExporter.php index 294f1dba82..01b838ef14 100644 --- a/includes/site/SiteExporter.php +++ b/includes/site/SiteExporter.php @@ -52,10 +52,10 @@ class SiteExporter { * @param Site[]|SiteList $sites */ public function exportSites( $sites ) { - $attributes = array( + $attributes = [ 'version' => '1.0', 'xmlns' => 'http://www.mediawiki.org/xml/sitelist-1.0/', - ); + ]; fwrite( $this->sink, Xml::openElement( 'sites', $attributes ) . "\n" ); @@ -74,7 +74,7 @@ class SiteExporter { */ private function exportSite( Site $site ) { if ( $site->getType() !== Site::TYPE_UNKNOWN ) { - $siteAttr = array( 'type' => $site->getType() ); + $siteAttr = [ 'type' => $site->getType() ]; } else { $siteAttr = null; } @@ -96,12 +96,12 @@ class SiteExporter { } foreach ( $site->getAllPaths() as $type => $path ) { - fwrite( $this->sink, "\t\t" . Xml::element( 'path', array( 'type' => $type ), $path ) . "\n" ); + fwrite( $this->sink, "\t\t" . Xml::element( 'path', [ 'type' => $type ], $path ) . "\n" ); } foreach ( $site->getLocalIds() as $type => $ids ) { foreach ( $ids as $id ) { - fwrite( $this->sink, "\t\t" . Xml::element( 'localid', array( 'type' => $type ), $id ) . "\n" ); + fwrite( $this->sink, "\t\t" . Xml::element( 'localid', [ 'type' => $type ], $id ) . "\n" ); } }