static $required = [ 'type', 'userid', 'notifTime', 'curTime' ];
$missing = implode( ', ', array_diff( $required, array_keys( $this->params ) ) );
if ( $missing != '' ) {
- throw new InvalidArgumentException( "Missing paramter(s) $missing" );
+ throw new InvalidArgumentException( "Missing parameter(s) $missing" );
}
$this->removeDuplicates = true;
}
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',