X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fsite%2FSiteExporter.php;h=0c9f9963ccaac107887d4ea17a982b6f3c0ff539;hb=748c5eae2fd5d897c94c48771161c259941a7488;hp=294f1dba8206be7b0a834df2853a1eb86be1f1f9;hpb=c847ed332e0720003c174d3fb813a3c4ca400416;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/site/SiteExporter.php b/includes/site/SiteExporter.php index 294f1dba82..0c9f9963cc 100644 --- a/includes/site/SiteExporter.php +++ b/includes/site/SiteExporter.php @@ -24,7 +24,7 @@ * @file * @ingroup Site * - * @license GNU GPL v2+ + * @license GPL-2.0-or-later * @author Daniel Kinzler */ class SiteExporter { @@ -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" ); } }