"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",
pcntl_signal_dispatch();
} else {
declare( ticks = 1 ) {
+ // @phan-suppress-next-line PhanPluginDuplicateExpressionAssignment
$status = $status;
}
}
$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 );
}
$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() ]
}
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',
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 ) );
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 );
*/
private function parseParams( FormOptions $opts, $par ) {
# Get parameters
- $par = $par !== null ? $par : '';
+ $par = $par ?? '';
$parms = explode( '/', $par );
$symsForAll = [ '*', 'all' ];
if ( $parms[0] != '' &&
}
$request = $this->getRequest();
- $par = ( $par !== null ) ? $par : '';
+ $par = $par ?? '';
$parms = explode( '/', $par );
$symsForAll = [ '*', 'user' ];