X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fsite%2FSiteImporter.php;h=956bdab37e6ff997bb8fd523d6849ea0df991bf3;hb=e0a3801da297d012fc67f2c128ab7e57e20f0571;hp=02c3ca48152c99c6f3d0089a125f542881236f32;hpb=bd5fd843d672e35dde630d6be5d76437e8f5205a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/site/SiteImporter.php b/includes/site/SiteImporter.php index 02c3ca4815..956bdab37e 100644 --- a/includes/site/SiteImporter.php +++ b/includes/site/SiteImporter.php @@ -24,7 +24,7 @@ * @file * @ingroup Site * - * @license GNU GPL v2+ + * @license GPL-2.0-or-later * @author Daniel Kinzler */ class SiteImporter { @@ -90,7 +90,9 @@ class SiteImporter { foreach ( $errors as $error ) { /** @var LibXMLError $error */ - throw new InvalidArgumentException( 'Malformed XML: ' . $error->message . ' in line ' . $error->line ); + throw new InvalidArgumentException( + 'Malformed XML: ' . $error->message . ' in line ' . $error->line + ); } throw new InvalidArgumentException( 'Malformed XML!' ); @@ -114,7 +116,7 @@ class SiteImporter { * @return Site[] */ private function makeSiteList( DOMElement $root ) { - $sites = array(); + $sites = []; // Old sites, to get the row IDs that correspond to the global site IDs. // TODO: Get rid of internal row IDs, they just get in the way. Get rid of ORMRow, too. @@ -181,15 +183,15 @@ class SiteImporter { $site->addLocalId( $idType, $id ); } - //@todo: import - //@todo: import + // @todo: import + // @todo: import return $site; } /** * @param DOMElement $element - * @param $name + * @param string $name * @param string|null|bool $default * * @return null|string @@ -202,7 +204,9 @@ class SiteImporter { if ( $default !== false ) { return $default; } else { - throw new MWException( 'Required ' . $name . ' attribute not found in <' . $element->tagName . '> tag' ); + throw new MWException( + 'Required ' . $name . ' attribute not found in <' . $element->tagName . '> tag' + ); } } @@ -224,7 +228,9 @@ class SiteImporter { if ( $default !== false ) { return $default; } else { - throw new MWException( 'Required <' . $name . '> tag not found inside <' . $element->tagName . '> tag' ); + throw new MWException( + 'Required <' . $name . '> tag not found inside <' . $element->tagName . '> tag' + ); } }