* results available.
*/
public function __construct( $containedSyntax = false, $hasMoreResults = false ) {
- if ( static::class === __CLASS__ ) {
+ if ( static::class === self::class ) {
// This class will eventually be abstract. SearchEngine implementations
// already have to extend this class anyways to provide the actual
// search results.
/**
* Some search modes will run an alternative query that it thinks gives
* a better result than the provided search. Returns true if this has
- * occured.
+ * occurred.
*
* @return bool
*/
$it = $this->bcIterator();
$searchResult = $it->current();
$it->next();
- return $searchResult === null ? false : $searchResult;
+ return $searchResult ?? false;
}
/**
return;
}
$result->setExtensionData( function () use ( $id ) {
- if ( isset( $this->extraData[$id] ) ) {
- return $this->extraData[$id];
- } else {
- return [];
- }
+ return $this->extraData[$id] ?? [];
} );
}