mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-21 12:38:01 +01:00
More consice PHP
This commit is contained in:
parent
8f71b408ef
commit
9c8402644b
1 changed files with 2 additions and 5 deletions
|
@ -105,10 +105,7 @@ class Favourite extends Model
|
|||
public function getTypeAttribute()
|
||||
{
|
||||
// As of PHP 7.2, get_class is picky about null args
|
||||
if ($resource = $this->resource) {
|
||||
return get_class($resource);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
$resource = $this->resource;
|
||||
return $resource ? get_class($resource) : null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue