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:
Umherirrender 2023-10-22 00:28:46 +02:00
parent a7f754c978
commit 9efeb791d1

View file

@ -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;
}
/**