mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-27 17:50:15 +00:00
Replace empty() with a null coalesce
empty() should only be used to suppress errors Found by a new phan plugin (T234237) Change-Id: I91bff6a35611ecb498e10eace1ad6da6604aed4f
This commit is contained in:
parent
a7f754c978
commit
9efeb791d1
|
@ -89,10 +89,7 @@ class OATHUser {
|
|||
* @return IAuthKey|null
|
||||
*/
|
||||
public function getFirstKey() {
|
||||
if ( !empty( $this->keys ) ) {
|
||||
return $this->keys[0];
|
||||
}
|
||||
return null;
|
||||
return $this->keys[0] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue