mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-01-31 19:16:44 +01:00
Shift bindings
PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser.
This commit is contained in:
parent
3e1869f7e6
commit
3573bed220
1 changed files with 2 additions and 2 deletions
|
@ -69,10 +69,10 @@ class ArtistsController extends ApiControllerBase
|
|||
$albums = [];
|
||||
|
||||
foreach ($favs as $fav) {
|
||||
if ($fav->type == 'App\Models\Track') {
|
||||
if ($fav->type == \App\Models\Track::class) {
|
||||
$tracks[] = Track::mapPublicTrackSummary($fav->track);
|
||||
} else {
|
||||
if ($fav->type == 'App\Models\Album') {
|
||||
if ($fav->type == \App\Models\Album::class) {
|
||||
$albums[] = Album::mapPublicAlbumSummary($fav->album);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue