mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
chore: add larastan
This commit is contained in:
parent
c1a4acc40a
commit
1122764333
8 changed files with 209 additions and 4 deletions
|
|
@ -98,6 +98,7 @@ class MashupCreateCommand extends Command
|
|||
|
||||
protected function selectPlaylist(Device $device): ?Playlist
|
||||
{
|
||||
/** @var Collection|Playlist[] $playlists */
|
||||
$playlists = $device->playlists;
|
||||
if ($playlists->isEmpty()) {
|
||||
$this->error('No playlists found for this device. Please create a playlist first.');
|
||||
|
|
@ -107,7 +108,7 @@ class MashupCreateCommand extends Command
|
|||
|
||||
$playlistId = select(
|
||||
label: 'Select a playlist',
|
||||
options: $playlists->mapWithKeys(fn ($playlist) => [$playlist->id => $playlist->name])->toArray()
|
||||
options: $playlists->mapWithKeys(fn (Playlist $playlist) => [$playlist->id => $playlist->name])->toArray()
|
||||
);
|
||||
|
||||
return $playlists->firstWhere('id', $playlistId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue