public static function getInstance( Language $lang = null ) {
global $wgMainCacheType;
- $lang = $lang ?: MediaWikiServices::getInstance()->getContentLanguage();
+ $lang = $lang ?? MediaWikiServices::getInstance()->getContentLanguage();
$cache = ObjectCache::getLocalServerInstance( $wgMainCacheType );
static $dateFormatter = false;
*/
private function replace( $matches ) {
# Extract information from $matches
- $linked = true;
- if ( isset( $this->mLinked ) ) {
- $linked = $this->mLinked;
- }
+ $linked = $this->mLinked ?? true;
$bits = [];
$key = $this->keys[$this->mSource];