Merge "Avoid uses of wfWikiId() in maintenance/"
[lhc/web/wiklou.git] / includes / installer / WebInstallerOptions.php
index 7c1619a..7bec49a 100644 (file)
@@ -105,6 +105,7 @@ class WebInstallerOptions extends WebInstallerPage {
                );
 
                $skins = $this->parent->findExtensions( 'skins' )->value;
+               '@phan-var array[] $skins';
                $skinHtml = $this->getFieldsetStart( 'config-skins' );
 
                $skinNames = array_map( 'strtolower', array_keys( $skins ) );
@@ -118,7 +119,6 @@ class WebInstallerOptions extends WebInstallerPage {
                                'value' => $chosenSkinName,
                        ] );
 
-                       // @phan-suppress-next-line PhanTypeNoAccessiblePropertiesForeach
                        foreach ( $skins as $skin => $info ) {
                                if ( isset( $info['screenshots'] ) ) {
                                        $screenshotText = $this->makeScreenshotsLink( $skin, $info['screenshots'] );
@@ -146,6 +146,7 @@ class WebInstallerOptions extends WebInstallerPage {
                $this->addHTML( $skinHtml );
 
                $extensions = $this->parent->findExtensions()->value;
+               '@phan-var array[] $extensions';
                $dependencyMap = [];
 
                if ( $extensions ) {
@@ -154,7 +155,6 @@ class WebInstallerOptions extends WebInstallerPage {
                        $extByType = [];
                        $types = SpecialVersion::getExtensionTypes();
                        // Sort by type first
-                       // @phan-suppress-next-line PhanTypeNoAccessiblePropertiesForeach
                        foreach ( $extensions as $ext => $info ) {
                                if ( !isset( $info['type'] ) || !isset( $types[$info['type']] ) ) {
                                        // We let extensions normally define custom types, but
@@ -326,13 +326,16 @@ class WebInstallerOptions extends WebInstallerPage {
                return null;
        }
 
+       /**
+        * @param string $name
+        * @param array $screenshots
+        */
        private function makeScreenshotsLink( $name, $screenshots ) {
                global $wgLang;
                if ( count( $screenshots ) > 1 ) {
                        $links = [];
                        $counter = 1;
 
-                       // @phan-suppress-next-line PhanTypeNoAccessiblePropertiesForeach
                        foreach ( $screenshots as $shot ) {
                                $links[] = Html::element(
                                        'a',