A few issues have snuck in since I33b421c8cb11cdd4ce896488c9ff5313f03a38cf.
Change-Id: Ib75470a7a3c19e2d48f498b396eee6ed733690e4
$searchEngine = MediaWikiServices::getInstance()->getSearchEngineFactory()->create( $type );
$limit = $params['limit'];
$searchEngine->setNamespaces( $params['namespace'] );
$searchEngine = MediaWikiServices::getInstance()->getSearchEngineFactory()->create( $type );
$limit = $params['limit'];
$searchEngine->setNamespaces( $params['namespace'] );
- $offset = isset( $params['offset'] ) ? $params['offset'] : null;
+ $offset = $params['offset'] ?? null;
$searchEngine->setLimitOffset( $limit, $offset );
// Initialize requested search profiles.
$searchEngine->setLimitOffset( $limit, $offset );
// Initialize requested search profiles.
* @return bool
*/
public function isHelpInline() {
* @return bool
*/
public function isHelpInline() {
- return isset( $this->mParams['help-inline'] ) ? $this->mParams['help-inline'] : true;
+ return $this->mParams['help-inline'] ?? true;
'rows' => $this->mParams['rows'],
'columns' => $this->mParams['columns'],
'tooltips' => $this->mParams['tooltips'],
'rows' => $this->mParams['rows'],
'columns' => $this->mParams['columns'],
'tooltips' => $this->mParams['tooltips'],
- 'forcedOff' => isset( $this->mParams['force-options-off'] ) ?
- $this->mParams['force-options-off'] : [],
- 'forcedOn' => isset( $this->mParams['force-options-on'] ) ?
- $this->mParams['force-options-on'] : [],
+ 'forcedOff' => $this->mParams['force-options-off'] ?? [],
+ 'forcedOn' => $this->mParams['force-options-on'] ?? [],
'values' => $value
] + OOUI\Element::configFromHtmlAttributes( $attribs )
);
'values' => $value
] + OOUI\Element::configFromHtmlAttributes( $attribs )
);
*/
public function __construct( BagOStuff $store, array $client, $posIndex = null ) {
$this->store = $store;
*/
public function __construct( BagOStuff $store, array $client, $posIndex = null ) {
$this->store = $store;
- $this->clientId = isset( $client['clientId'] )
- ? $client['clientId']
- : md5( $client['ip'] . "\n" . $client['agent'] );
+ $this->clientId = $client['clientId'] ??
+ md5( $client['ip'] . "\n" . $client['agent'] );
$this->key = $store->makeGlobalKey( __CLASS__, $this->clientId, 'v2' );
$this->waitForPosIndex = $posIndex;
$this->key = $store->makeGlobalKey( __CLASS__, $this->clientId, 'v2' );
$this->waitForPosIndex = $posIndex;
parent::__construct( $config );
parent::__construct( $config );
- $this->name = isset( $config['name'] ) ?
- $config[ 'name' ] : null;
- $this->id = isset( $config['id'] ) ?
- $config['id'] : null;
+ $this->name = $config['name'] ?? null;
+ $this->id = $config['id'] ?? null;
- $this->rows = isset( $config['rows'] ) ?
- $config['rows'] : [];
- $this->columns = isset( $config['columns'] ) ?
- $config['columns'] : [];
- $this->tooltips = isset( $config['tooltips'] ) ?
- $config['tooltips'] : [];
+ $this->rows = $config['rows'] ?? [];
+ $this->columns = $config['columns'] ?? [];
+ $this->tooltips = $config['tooltips'] ?? [];
- $this->values = isset( $config['values'] ) ?
- $config['values'] : [];
+ $this->values = $config['values'] ?? [];
- $this->forcedOn = isset( $config['forcedOn'] ) ?
- $config['forcedOn'] : [];
- $this->forcedOff = isset( $config['forcedOff'] ) ?
- $config['forcedOff'] : [];
+ $this->forcedOn = $config['forcedOn'] ?? [];
+ $this->forcedOff = $config['forcedOff'] ?? [];
// Build the table
$table = new \OOUI\Tag( 'table' );
// Build the table
$table = new \OOUI\Tag( 'table' );
* @return string Tooltip. Null if none is available.
*/
private function getTooltip( $label ) {
* @return string Tooltip. Null if none is available.
*/
private function getTooltip( $label ) {
- return isset( $this->tooltips[ $label ] ) ?
- $this->tooltips[ $label ] : null;
+ return $this->tooltips[ $label ] ?? null;
}
protected function getJavaScriptClassName() {
}
protected function getJavaScriptClassName() {