Use isUnknown

This commit is contained in:
An Phan 2016-02-11 00:01:44 +07:00
parent b356800a32
commit f86b3bfdb1

View file

@ -31,6 +31,11 @@ class Album extends Model
return $this->hasMany(Song::class);
}
public function isUnknown()
{
return $this->id === self::UNKNOWN_ID;
}
/**
* Get an album using some provided information.
*
@ -54,12 +59,12 @@ class Album extends Model
/**
* Get extra information about the album from Last.fm.
*
*
* @return array|false
*/
public function getInfo()
{
if ($this->id === self::UNKNOWN_ID) {
if ($this->isUnknown()) {
return false;
}