mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
Typos and doc fixes
This commit is contained in:
parent
3102e9691e
commit
b151f3f00a
12 changed files with 23 additions and 21 deletions
|
@ -6,5 +6,4 @@ use App\Http\Controllers\Controller as BaseController;
|
|||
|
||||
abstract class Controller extends BaseController
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ class AlbumController extends Controller
|
|||
* @param Request $request
|
||||
* @param Album $album
|
||||
*
|
||||
* @return
|
||||
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
*/
|
||||
public function download(Request $request, Album $album)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ class ArtistController extends Controller
|
|||
* @param Request $request
|
||||
* @param Artist $artist
|
||||
*
|
||||
* @return
|
||||
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
*/
|
||||
public function download(Request $request, Artist $artist)
|
||||
{
|
||||
|
|
|
@ -6,5 +6,4 @@ use App\Http\Controllers\API\Controller as BaseController;
|
|||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -11,10 +11,9 @@ class FavoritesController extends Controller
|
|||
/**
|
||||
* Download all songs in a playlist.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Playlist $playlist
|
||||
* @param Request $request
|
||||
*
|
||||
* @return
|
||||
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
*/
|
||||
public function download(Request $request)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ class PlaylistController extends Controller
|
|||
* @param Request $request
|
||||
* @param Playlist $playlist
|
||||
*
|
||||
* @return
|
||||
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
*/
|
||||
public function download(Request $request, Playlist $playlist)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ class SongController extends Controller
|
|||
*
|
||||
* @param SongRequest $request
|
||||
*
|
||||
* @return
|
||||
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
*/
|
||||
public function download(SongRequest $request)
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property string name Name of the album
|
||||
* @property bool is_compilation If the album is a compilation from multiple artists
|
||||
* @property Artist artist The album's artist
|
||||
* @property int artist_id
|
||||
*/
|
||||
class Album extends Model
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ use Log;
|
|||
/**
|
||||
* @property int id The model ID
|
||||
* @property string name The artist name
|
||||
* @property string image
|
||||
*/
|
||||
class Artist extends Model
|
||||
{
|
||||
|
|
|
@ -153,7 +153,7 @@ class File
|
|||
* Sync the song with all available media info against the database.
|
||||
*
|
||||
* @param array $tags The (selective) tags to sync (if the song exists)
|
||||
* @param bool $force Whether to force syncing, even if the file is unchaged
|
||||
* @param bool $force Whether to force syncing, even if the file is unchanged
|
||||
*
|
||||
* @return bool|Song A Song object on success,
|
||||
* true if file exists but is unmodified,
|
||||
|
@ -171,7 +171,6 @@ class File
|
|||
return false;
|
||||
}
|
||||
|
||||
$isCompilation = false;
|
||||
$artist = null;
|
||||
|
||||
if ($this->isChanged() || $force) {
|
||||
|
|
|
@ -9,7 +9,10 @@ use Lastfm;
|
|||
/**
|
||||
* @property string path
|
||||
* @property string title
|
||||
* @property Album album
|
||||
* @property Album album
|
||||
* @property int contributing_artist_id
|
||||
* @property Artist contributingArtist
|
||||
* @property Artist artist
|
||||
*/
|
||||
class Song extends Model
|
||||
{
|
||||
|
@ -108,7 +111,7 @@ class Song extends Model
|
|||
* All of these are optional, in which case the info will not be changed
|
||||
* (except for lyrics, which will be emptied).
|
||||
*
|
||||
* @return
|
||||
* @return array
|
||||
*/
|
||||
public static function updateInfo($ids, $data)
|
||||
{
|
||||
|
@ -165,7 +168,7 @@ class Song extends Model
|
|||
$compilationState = 1;
|
||||
}
|
||||
|
||||
// If the complitation state is "no change," we determine it via the current
|
||||
// If the compilation state is "no change," we determine it via the current
|
||||
// "contributing_artist_id" field value.
|
||||
if ($compilationState === 2) {
|
||||
$compilationState = $this->contributing_artist_id ? 1 : 0;
|
||||
|
@ -216,12 +219,12 @@ class Song extends Model
|
|||
}
|
||||
|
||||
/**
|
||||
* Get all songs favorited by a user.
|
||||
* Get all songs favored by a user.
|
||||
*
|
||||
* @param User $user
|
||||
* @param bool $toArray
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection|Array
|
||||
* @return \Illuminate\Database\Eloquent\Collection|array
|
||||
*/
|
||||
public static function getFavorites(User $user, $toArray = false)
|
||||
{
|
||||
|
@ -269,9 +272,9 @@ class Song extends Model
|
|||
*/
|
||||
public function getLyricsAttribute($value)
|
||||
{
|
||||
// We don't use nl2br() here, because the function actually preserves linebreaks -
|
||||
// We don't use nl2br() here, because the function actually preserves line breaks -
|
||||
// it just _appends_ a "<br />" after each of them. This would cause our client
|
||||
// implementation of br2nl to fail with duplicated linebreaks.
|
||||
// implementation of br2nl to fail with duplicated line breaks.
|
||||
return str_replace(["\r\n", "\r", "\n"], '<br />', $value);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,10 @@ namespace App\Models;
|
|||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
|
||||
/**
|
||||
* @property array preferences
|
||||
* @property int id
|
||||
* @property bool is_admin
|
||||
* @property array preferences
|
||||
* @property int id
|
||||
* @property bool is_admin
|
||||
* @property string lastfm_session_key
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue