X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fsite%2FSiteExporter.php;h=01b838ef147e7ac9107d5626551e0fa6f5b30d62;hb=f44275ec1f2d243563b60041b7a29052f60bda24;hp=169c0d87a5bf9216548ff03c871597d7c7dd5e9e;hpb=5161541d87d663ea86b66258a568349a6cc8fde9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/site/SiteExporter.php b/includes/site/SiteExporter.php index 169c0d87a5..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,17 +96,17 @@ 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" ); } } - //@todo: export - //@todo: export + // @todo: export + // @todo: export fwrite( $this->sink, "\t" . Xml::closeElement( 'site' ) . "\n" ); }