mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
Apply fixes from StyleCI (#871)
This commit is contained in:
parent
edba3c647e
commit
ffabd54093
26 changed files with 55 additions and 53 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
return [
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Deployment configuration
|
||||
|
@ -20,7 +19,7 @@ return [
|
|||
|
||||
'branch' => 'gh-pages',
|
||||
|
||||
'message' => 'Site updated: ' . strftime('%YYYY-%MM-%DD %HH:%mm:%ss')
|
||||
'message' => 'Site updated: '.strftime('%YYYY-%MM-%DD %HH:%mm:%ss'),
|
||||
|
||||
]
|
||||
],
|
||||
];
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
return [
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Deployment configuration
|
||||
|
@ -20,7 +19,7 @@ return [
|
|||
|
||||
'branch' => 'gh-pages',
|
||||
|
||||
'message' => 'Site updated: ' . strftime('%YYYY-%MM-%DD %HH:%mm:%ss')
|
||||
'message' => 'Site updated: '.strftime('%YYYY-%MM-%DD %HH:%mm:%ss'),
|
||||
|
||||
]
|
||||
],
|
||||
];
|
|
@ -23,7 +23,7 @@ class AuthController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Log a user in
|
||||
* Log a user in.
|
||||
*
|
||||
* Koel uses [JSON Web Tokens](https://jwt.io/) (JWT) for authentication.
|
||||
* After the user has been authenticated, a random "token" will be returned.
|
||||
|
@ -53,7 +53,7 @@ class AuthController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Log the current user out
|
||||
* Log the current user out.
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
|
|
@ -55,7 +55,7 @@ class DataController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Get application data
|
||||
* Get application data.
|
||||
*
|
||||
* The big fat call to retrieve a set of application data catered for the current user
|
||||
* (songs, albums, artists, playlists, interactions, and if the user is an admin, settings as well).
|
||||
|
|
|
@ -10,7 +10,7 @@ use App\Models\Album;
|
|||
class AlbumController extends Controller
|
||||
{
|
||||
/**
|
||||
* Download a whole album
|
||||
* Download a whole album.
|
||||
*
|
||||
* @response []
|
||||
*/
|
||||
|
|
|
@ -10,7 +10,7 @@ use App\Models\Artist;
|
|||
class ArtistController extends Controller
|
||||
{
|
||||
/**
|
||||
* Download all songs by an artist
|
||||
* Download all songs by an artist.
|
||||
*
|
||||
* Don't see why one would need this, really.
|
||||
* Let's pray to God the user doesn't trigger this on Elvis.
|
||||
|
|
|
@ -20,7 +20,7 @@ class FavoritesController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Download all songs favorite'd by the current user
|
||||
* Download all songs favorite'd by the current user.
|
||||
*
|
||||
* @response []
|
||||
*/
|
||||
|
|
|
@ -11,7 +11,7 @@ use Illuminate\Auth\Access\AuthorizationException;
|
|||
class PlaylistController extends Controller
|
||||
{
|
||||
/**
|
||||
* Download a whole playlist
|
||||
* Download a whole playlist.
|
||||
*
|
||||
* @response []
|
||||
*
|
||||
|
|
|
@ -20,7 +20,7 @@ class SongController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Download one or several songs
|
||||
* Download one or several songs.
|
||||
*
|
||||
* @queryParam songs array An array of song IDs
|
||||
*
|
||||
|
|
|
@ -10,7 +10,7 @@ use App\Http\Requests\API\BatchInteractionRequest;
|
|||
class BatchLikeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Like multiple songs
|
||||
* Like multiple songs.
|
||||
*
|
||||
* Like several songs at once, useful for "batch" actions. An array of "interaction" records containing the song
|
||||
* and user data will be returned.
|
||||
|
@ -26,7 +26,7 @@ class BatchLikeController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Unlike multiple songs
|
||||
* Unlike multiple songs.
|
||||
*
|
||||
* Unlike several songs at once, useful for "batch" actions. An array of "interaction" records containing the song
|
||||
* and user data will be returned.
|
||||
|
|
|
@ -11,7 +11,7 @@ use Illuminate\Http\JsonResponse;
|
|||
class LikeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Like or unlike a song
|
||||
* Like or unlike a song.
|
||||
*
|
||||
* An "interaction" record including the song and current user's data will be returned.
|
||||
*
|
||||
|
|
|
@ -12,7 +12,7 @@ use Illuminate\Http\JsonResponse;
|
|||
class PlayCountController extends Controller
|
||||
{
|
||||
/**
|
||||
* Increase play count
|
||||
* Increase play count.
|
||||
*
|
||||
* Increase a song's play count as the currently authenticated user.
|
||||
* This request should be made whenever a song is played.
|
||||
|
|
|
@ -20,7 +20,7 @@ class RecentlyPlayedController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Get recently played songs
|
||||
* Get recently played songs.
|
||||
*
|
||||
* Get a list of songs recently played by the current user.
|
||||
*
|
||||
|
|
|
@ -14,7 +14,6 @@ use Tymon\JWTAuth\JWTAuth;
|
|||
|
||||
/**
|
||||
* @group Last.fm integration
|
||||
*
|
||||
*/
|
||||
class LastfmController extends Controller
|
||||
{
|
||||
|
@ -30,7 +29,7 @@ class LastfmController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Connect to Last.fm
|
||||
* Connect to Last.fm.
|
||||
*
|
||||
* [Connect](https://www.last.fm/api/authentication) the current user to Last.fm.
|
||||
* This is actually NOT an API request. The application should instead redirect the current user to this route,
|
||||
|
@ -59,7 +58,7 @@ class LastfmController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Serve the callback request from Last.fm
|
||||
* Serve the callback request from Last.fm.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
|
@ -75,7 +74,7 @@ class LastfmController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Set Last.fm session key
|
||||
* Set Last.fm session key.
|
||||
*
|
||||
* Set the Last.fm session key for the current user. This call should be made after the user is
|
||||
* [connected to Last.fm](https://www.last.fm/api/authentication).
|
||||
|
@ -95,7 +94,7 @@ class LastfmController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Disconnect the current user from Last.fm
|
||||
* Disconnect the current user from Last.fm.
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
|
|
@ -11,7 +11,7 @@ use Illuminate\Http\JsonResponse;
|
|||
class AlbumController extends Controller
|
||||
{
|
||||
/**
|
||||
* Get album's extra information
|
||||
* Get album's extra information.
|
||||
*
|
||||
* Get extra information about an album via Last.fm.
|
||||
*
|
||||
|
|
|
@ -11,7 +11,7 @@ use Illuminate\Http\JsonResponse;
|
|||
class ArtistController extends Controller
|
||||
{
|
||||
/**
|
||||
* Get artist's extra information
|
||||
* Get artist's extra information.
|
||||
*
|
||||
* Get extra information about an artist via Last.fm.
|
||||
*
|
||||
|
|
|
@ -21,7 +21,7 @@ class SongController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Get song's extra information
|
||||
* Get song's extra information.
|
||||
*
|
||||
* Get a song's extra information. The response of this request is a superset of both corresponding
|
||||
* `album/{album}/info` and `artist/{artist}/info` requests, combined with the song's lyrics and related YouTube
|
||||
|
|
|
@ -37,7 +37,7 @@ class SongController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Store a song
|
||||
* Store a song.
|
||||
*
|
||||
* Create a new song or update an existing one with data sent from AWS.
|
||||
*
|
||||
|
@ -74,7 +74,7 @@ class SongController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove a song
|
||||
* Remove a song.
|
||||
*
|
||||
* Remove a song whose information matches with data sent from AWS.
|
||||
*
|
||||
|
|
|
@ -27,7 +27,7 @@ class PlaylistController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Get current user's playlists
|
||||
* Get current user's playlists.
|
||||
*
|
||||
* @responseFile responses/playlist.index.json
|
||||
*
|
||||
|
@ -39,7 +39,7 @@ class PlaylistController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a new playlist
|
||||
* Create a new playlist.
|
||||
*
|
||||
* @bodyParam name string required Name of the playlist. Example: Sleepy Songs
|
||||
* @bodyParam rules array An array of rules if creating a "smart playlist."
|
||||
|
@ -67,12 +67,13 @@ class PlaylistController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Rename a playlist
|
||||
* Rename a playlist.
|
||||
*
|
||||
* @bodyParam name string required New name of the playlist. Example: Catchy Songs
|
||||
* @responseFile responses/playlist.update.json
|
||||
*
|
||||
* @throws AuthorizationException
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, Playlist $playlist)
|
||||
|
@ -85,14 +86,15 @@ class PlaylistController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Replace a playlist's content
|
||||
* Replace a playlist's content.
|
||||
*
|
||||
* Instead of adding or removing songs individually, a playlist's content is replaced entirely with an array of song IDs.
|
||||
|
||||
*
|
||||
* @bodyParam songs array required An array of song IDs.
|
||||
* @response []
|
||||
*
|
||||
* @throws AuthorizationException
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function sync(PlaylistSyncRequest $request, Playlist $playlist)
|
||||
|
@ -107,11 +109,12 @@ class PlaylistController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Get a playlist's songs
|
||||
* Get a playlist's songs.
|
||||
*
|
||||
* @response ["0146d01afb742b01f28ab8b556f9a75d", "c741133cb8d1982a5c60b1ce2a1e6e47", "..."]
|
||||
*
|
||||
* @throws AuthorizationException
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function getSongs(Playlist $playlist)
|
||||
|
@ -126,12 +129,13 @@ class PlaylistController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Delete a playlist
|
||||
* Delete a playlist.
|
||||
*
|
||||
* @response []
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws AuthorizationException
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function destroy(Playlist $playlist)
|
||||
|
|
|
@ -21,7 +21,7 @@ class ProfileController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Get current user's profile
|
||||
* Get current user's profile.
|
||||
*
|
||||
* @response {
|
||||
* "id": 42,
|
||||
|
@ -37,7 +37,7 @@ class ProfileController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Update current user's profile
|
||||
* Update current user's profile.
|
||||
*
|
||||
* @bodyParam name string required New name. Example: Johny Doe
|
||||
* @bodyParam email string required New email. Example: johny@doe.com
|
||||
|
|
|
@ -21,7 +21,7 @@ class ScrobbleController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Scrobble a song
|
||||
* Scrobble a song.
|
||||
*
|
||||
* Create a [Last.fm scrobble entry](https://www.last.fm/api/scrobbling) for a song.
|
||||
*
|
||||
|
|
|
@ -21,7 +21,7 @@ class SettingController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Save the application settings
|
||||
* Save the application settings.
|
||||
*
|
||||
* Save the application settings. Right now there's only one setting to be saved (`media_path`).
|
||||
*
|
||||
|
|
|
@ -36,7 +36,7 @@ class SongController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Play a song
|
||||
* Play a song.
|
||||
*
|
||||
* The GET request to play/stream a song. By default Koel will serve the file as-is, unless it's a FLAC.
|
||||
* If the value of `transcode` is truthy, Koel will attempt to transcode the file into `bitRate`kbps using ffmpeg.
|
||||
|
@ -62,12 +62,13 @@ class SongController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Update song information
|
||||
* Update song information.
|
||||
*
|
||||
* @bodyParam songs array required An array of song IDs to be updated.
|
||||
* @bodyParam data object required The new data, with these supported fields: `title`, `artistName`, `albumName`, and `lyrics`.
|
||||
*
|
||||
* @group 5. Media information
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(SongUpdateRequest $request)
|
||||
|
|
|
@ -24,7 +24,7 @@ class UserController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a new user
|
||||
* Create a new user.
|
||||
*
|
||||
* @bodyParam name string required User's name. Example: John Doe
|
||||
* @bodyParam email string required User's email. Example: john@doe.com
|
||||
|
@ -50,7 +50,7 @@ class UserController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Update a user
|
||||
* Update a user.
|
||||
*
|
||||
* @bodyParam name string required New name. Example: Johny Doe
|
||||
* @bodyParam email string required New email. Example: johny@doe.com
|
||||
|
@ -76,7 +76,7 @@ class UserController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Delete a user
|
||||
* Delete a user.
|
||||
*
|
||||
* @response []
|
||||
*
|
||||
|
|
|
@ -20,7 +20,7 @@ class YouTubeController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Search for YouTube videos
|
||||
* Search for YouTube videos.
|
||||
*
|
||||
* Search YouTube for videos related to a song (using its title and artist name).
|
||||
*
|
||||
|
|
|
@ -83,7 +83,7 @@ return [
|
|||
'auth.login',
|
||||
's3.*',
|
||||
'song.play',
|
||||
'lastfm.*'
|
||||
'lastfm.*',
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue