Merge "build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 and make...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 17 May 2019 14:52:23 +0000 (14:52 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 17 May 2019 14:52:23 +0000 (14:52 +0000)
composer.json
includes/ForkController.php
includes/Revision/RevisionStore.php
includes/changes/ChangesList.php
includes/jobqueue/jobs/ActivityUpdateJob.php
includes/libs/filebackend/SwiftFileBackend.php
includes/rcfeed/FormattedRCFeed.php
includes/specials/SpecialLog.php
includes/specials/pagers/UsersPager.php

index 1c7f22a..b1242c5 100644 (file)
@@ -75,7 +75,7 @@
                "wikimedia/avro": "1.8.0",
                "wikimedia/testing-access-wrapper": "~1.0",
                "wmde/hamcrest-html-matchers": "^0.1.0",
-               "mediawiki/mediawiki-phan-config": "0.5.0"
+               "mediawiki/mediawiki-phan-config": "0.6.0"
        },
        "replace": {
                "symfony/polyfill-ctype": "1.99",
index cc16964..85f3a7d 100644 (file)
@@ -123,6 +123,7 @@ class ForkController {
                                pcntl_signal_dispatch();
                        } else {
                                declare( ticks = 1 ) {
+                                       // @phan-suppress-next-line PhanPluginDuplicateExpressionAssignment
                                        $status = $status;
                                }
                        }
index ea4cf88..29d7848 100644 (file)
@@ -1912,6 +1912,7 @@ class RevisionStore
                $this->initializeMutableRevisionFromArray( $revision, $fields );
 
                if ( isset( $fields['content'] ) && is_array( $fields['content'] ) ) {
+                       // @phan-suppress-next-line PhanTypeNoPropertiesForeach
                        foreach ( $fields['content'] as $role => $content ) {
                                $revision->setContent( $role, $content );
                        }
index 184a2c1..6f6887b 100644 (file)
@@ -411,7 +411,7 @@ class ChangesList extends ContextSource {
                $date = $lang->userTimeAndDate( $ts, $user );
                if ( $rev->userCan( Revision::DELETED_TEXT, $user ) ) {
                        $link = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
-                               $title !== null ? $title : $rev->getTitle(),
+                               $title ?? $rev->getTitle(),
                                $date,
                                [ 'class' => 'mw-changeslist-date' ],
                                [ 'oldid' => $rev->getId() ]
index 9b08510..4de72a9 100644 (file)
@@ -59,9 +59,7 @@ class ActivityUpdateJob extends Job {
        }
 
        protected function updateWatchlistNotification() {
-               $casTimestamp = ( $this->params['notifTime'] !== null )
-                       ? $this->params['notifTime']
-                       : $this->params['curTime'];
+               $casTimestamp = $this->params['notifTime'] ?? $this->params['curTime'];
 
                $dbw = wfGetDB( DB_MASTER );
                $dbw->update( 'watchlist',
index 4ba1e1c..2587812 100644 (file)
@@ -1707,9 +1707,7 @@ class SwiftFileBackend extends FileBackendStore {
                                if ( $rcode >= 200 && $rcode <= 299 ) { // OK
                                        $this->authCreds = [
                                                'auth_token' => $rhdrs['x-auth-token'],
-                                               'storage_url' => ( $this->swiftStorageUrl !== null )
-                                                       ? $this->swiftStorageUrl
-                                                       : $rhdrs['x-storage-url']
+                                               'storage_url' => $this->swiftStorageUrl ?? $rhdrs['x-storage-url']
                                        ];
 
                                        $this->srvCache->set( $cacheKey, $this->authCreds, ceil( $this->authTTL / 2 ) );
index afe900d..d0b7ae3 100644 (file)
@@ -53,6 +53,7 @@ abstract class FormattedRCFeed extends RCFeed {
        public function notify( RecentChange $rc, $actionComment = null ) {
                $params = $this->params;
                /** @var RCFeedFormatter $formatter */
+               // @phan-suppress-next-line PhanTypeExpectedObjectOrClassName
                $formatter = is_object( $params['formatter'] ) ? $params['formatter'] : new $params['formatter'];
 
                $line = $formatter->getLine( $params, $rc, $actionComment );
index 21c166c..2f0c2ce 100644 (file)
@@ -185,7 +185,7 @@ class SpecialLog extends SpecialPage {
         */
        private function parseParams( FormOptions $opts, $par ) {
                # Get parameters
-               $par = $par !== null ? $par : '';
+               $par = $par ?? '';
                $parms = explode( '/', $par );
                $symsForAll = [ '*', 'all' ];
                if ( $parms[0] != '' &&
index 4453772..d08eb89 100644 (file)
@@ -49,7 +49,7 @@ class UsersPager extends AlphabeticPager {
                }
 
                $request = $this->getRequest();
-               $par = ( $par !== null ) ? $par : '';
+               $par = $par ?? '';
                $parms = explode( '/', $par );
                $symsForAll = [ '*', 'user' ];