Fix various real types related to scalar types
Swap null/false or use real strings if needed Found by phan strict checks Change-Id: Id82ea609f05a76c5cb8c661d5cf2b7922d6cfbc1
This commit is contained in:
parent
26109fb098
commit
4de76550a3
10 changed files with 10 additions and 10 deletions
|
|
@ -555,7 +555,7 @@ class CategoryViewer extends ContextSource {
|
|||
} else {
|
||||
// If the nextPage variable is null, it means that we have reached the first page
|
||||
// and therefore the previous link should be disabled.
|
||||
return $this->pagingLinks( null, $this->until[$type], $type );
|
||||
return $this->pagingLinks( '', $this->until[$type], $type );
|
||||
}
|
||||
} elseif ( $this->nextPage[$type] !== null || isset( $this->from[$type] ) ) {
|
||||
return $this->pagingLinks( $this->from[$type], $this->nextPage[$type], $type );
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ class WatchAction extends FormAction {
|
|||
|
||||
// If the expiry label isn't one of the predefined ones in the dropdown, calculate 'x days'.
|
||||
$expiryDays = WatchedItem::calculateExpiryInDays( $expiry );
|
||||
$defaultLabels = static::getExpiryOptions( $this->getContext(), null )['options'];
|
||||
$defaultLabels = static::getExpiryOptions( $this->getContext(), false )['options'];
|
||||
$localizedExpiry = array_search( $submittedExpiry, $defaultLabels );
|
||||
$expiryLabel = $expiryDays && $localizedExpiry === false
|
||||
? $this->getContext()->msg( 'days', $expiryDays )->text()
|
||||
|
|
|
|||
|
|
@ -643,7 +643,7 @@ class LogEventsList extends ContextSource {
|
|||
$types,
|
||||
$user,
|
||||
$page,
|
||||
'',
|
||||
false,
|
||||
$conds,
|
||||
false,
|
||||
false,
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
|
|||
|
||||
if ( $srcWidth * $srcHeight > $maxImageArea
|
||||
&& !( $file->getMimeType() == 'image/jpeg'
|
||||
&& $this->getScalerType( false, false ) == 'im' )
|
||||
&& $this->getScalerType( null, false ) == 'im' )
|
||||
) {
|
||||
# Only ImageMagick can efficiently downsize jpg images without loading
|
||||
# the entire file in memory
|
||||
|
|
|
|||
|
|
@ -853,7 +853,7 @@ class DeletePage {
|
|||
if ( !$this->isDeletePageUnitTest ) {
|
||||
// TODO Remove conditional once DeferredUpdates is servicified (T265749)
|
||||
DeferredUpdates::addUpdate( SiteStatsUpdate::factory(
|
||||
[ 'edits' => 1, 'articles' => -$countable, 'pages' => -1 ]
|
||||
[ 'edits' => 1, 'articles' => $countable ? -1 : 0, 'pages' => -1 ]
|
||||
) );
|
||||
|
||||
// Delete pagelinks, update secondary indexes, etc
|
||||
|
|
|
|||
|
|
@ -1440,7 +1440,7 @@ class User implements Authority, UserIdentity, UserEmailContact {
|
|||
$this->mBlock = null;
|
||||
$this->mBlockedby = '';
|
||||
$this->mBlockreason = '';
|
||||
$this->mHideName = 0;
|
||||
$this->mHideName = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -829,7 +829,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
|
|||
&& $options['sortByExpiry']
|
||||
) {
|
||||
// Add `wl_has_expiry` column to allow sorting by watched titles that have an expiration date first.
|
||||
$vars['wl_has_expiry'] = $db->conditional( 'we_expiry IS NULL', 0, 1 );
|
||||
$vars['wl_has_expiry'] = $db->conditional( 'we_expiry IS NULL', '0', '1' );
|
||||
// Display temporarily watched titles first.
|
||||
// Order by expiration date, with the titles that will expire soonest at the top.
|
||||
$dbOptions['ORDER BY'][] = "wl_has_expiry DESC";
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ class Xml {
|
|||
return self::label( wfMessage( 'year' )->text(), 'year' ) . ' ' .
|
||||
Html::input( 'year', $encYear, 'number', $inputAttribs ) . ' ' .
|
||||
self::label( wfMessage( 'month' )->text(), 'month' ) . ' ' .
|
||||
self::monthSelector( $encMonth, -1 );
|
||||
self::monthSelector( $encMonth, '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class ResetUserEmail extends Maintenance {
|
|||
] );
|
||||
if ( !$status->isGood() ) {
|
||||
$this->error( "Password couldn't be reset because:\n"
|
||||
. $status->getMessage( null, null, 'en' )->text() );
|
||||
. $status->getMessage( false, false, 'en' )->text() );
|
||||
}
|
||||
}
|
||||
$this->output( "Done!\n" );
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class AnsiTermColorer {
|
|||
* @return string
|
||||
*/
|
||||
public function reset() {
|
||||
return $this->color( 0 );
|
||||
return $this->color( '0' );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue