diff --git a/app/Events/SongLikeToggled.php b/app/Events/SongLikeToggled.php index 790c2cd773..ec5c45884a 100644 --- a/app/Events/SongLikeToggled.php +++ b/app/Events/SongLikeToggled.php @@ -12,14 +12,14 @@ class SongLikeToggled extends Event /** * The interaction (like/unlike) in action. - * + * * @var Interaction */ public $interaction; /** * The user who carries the action. - * + * * @var User */ public $user; diff --git a/app/Events/SongStartedPlaying.php b/app/Events/SongStartedPlaying.php index e73912ffd4..4b77d38c1a 100644 --- a/app/Events/SongStartedPlaying.php +++ b/app/Events/SongStartedPlaying.php @@ -12,14 +12,14 @@ class SongStartedPlaying extends Event /** * The now playing song. - * + * * @var Song */ public $song; /** * The user listening. - * + * * @var User */ public $user; diff --git a/app/Http/Controllers/API/LastfmController.php b/app/Http/Controllers/API/LastfmController.php index b60e133e36..7878923f69 100644 --- a/app/Http/Controllers/API/LastfmController.php +++ b/app/Http/Controllers/API/LastfmController.php @@ -12,14 +12,14 @@ class LastfmController extends Controller { /* * The Guard implementation. - * + * * @var Guard */ protected $auth; /** * Construct the controller and inject the current auth. - * + * * @param Guard $auth */ public function __construct(Guard $auth) @@ -58,7 +58,7 @@ public function connect(Redirector $redirector, Lastfm $lastfm, JWTAuth $auth = /** * Serve the callback request from Last.fm. - * + * * @param Request $request * @param Lastfm $lastfm * @@ -96,7 +96,7 @@ public function setSessionKey(Request $request) /** * Disconnect the current user from Last.fm. - * + * * @return \Illuminate\Http\JsonResponse */ public function disconnect() diff --git a/app/Http/Controllers/API/PlaylistController.php b/app/Http/Controllers/API/PlaylistController.php index 92088523e5..20a14246d6 100644 --- a/app/Http/Controllers/API/PlaylistController.php +++ b/app/Http/Controllers/API/PlaylistController.php @@ -10,7 +10,7 @@ class PlaylistController extends Controller { /** * Gets all playlists by the current user. - * + * * @return \Illuminate\Http\JsonResponse */ public function index() diff --git a/app/Http/Controllers/API/UserController.php b/app/Http/Controllers/API/UserController.php index 161267354a..52d28bd60c 100644 --- a/app/Http/Controllers/API/UserController.php +++ b/app/Http/Controllers/API/UserController.php @@ -38,7 +38,7 @@ public function login(UserLoginRequest $request) /** * Log the current user out. - * + * * @return \Illuminate\Http\JsonResponse */ public function logout() diff --git a/app/Http/Requests/API/SongUpdateRequest.php b/app/Http/Requests/API/SongUpdateRequest.php index 13eb263a0e..2c2ad32323 100644 --- a/app/Http/Requests/API/SongUpdateRequest.php +++ b/app/Http/Requests/API/SongUpdateRequest.php @@ -2,8 +2,6 @@ namespace App\Http\Requests\API; -use App\Http\Requests\API\Request; - class SongUpdateRequest extends Request { /** diff --git a/app/Http/Streamers/TranscodingStreamer.php b/app/Http/Streamers/TranscodingStreamer.php index 4b8d207949..77935023a4 100644 --- a/app/Http/Streamers/TranscodingStreamer.php +++ b/app/Http/Streamers/TranscodingStreamer.php @@ -43,7 +43,5 @@ public function stream() ]; passthru("$ffmpeg ".implode($args, ' ')); - - return; } } diff --git a/app/Listeners/LoveTrackOnLastfm.php b/app/Listeners/LoveTrackOnLastfm.php index 8df6f75463..73d05270cf 100644 --- a/app/Listeners/LoveTrackOnLastfm.php +++ b/app/Listeners/LoveTrackOnLastfm.php @@ -9,7 +9,7 @@ class LoveTrackOnLastfm { /** * The Last.fm service instance, which is DI'ed into our listener. - * + * * @var Lastfm */ protected $lastfm; diff --git a/app/Listeners/UpdateLastfmNowPlaying.php b/app/Listeners/UpdateLastfmNowPlaying.php index 216ec14cd4..1059a219b7 100644 --- a/app/Listeners/UpdateLastfmNowPlaying.php +++ b/app/Listeners/UpdateLastfmNowPlaying.php @@ -10,7 +10,7 @@ class UpdateLastfmNowPlaying { /** * The Last.fm service instance. - * + * * @var Lastfm */ protected $lastfm; diff --git a/app/Models/Song.php b/app/Models/Song.php index c1fdf0ccab..463315e574 100644 --- a/app/Models/Song.php +++ b/app/Models/Song.php @@ -103,7 +103,7 @@ public static function byPath($path) */ public static function updateInfo($ids, $data) { - /** + /* * The artist that our songs will be associated to. * If they are not existing yet, we will create the object. * @@ -111,7 +111,7 @@ public static function updateInfo($ids, $data) */ $targetArtist = null; - /** + /* * The album that our songs will be associated to. * If it can't be found, we'll create it. * @@ -119,7 +119,7 @@ public static function updateInfo($ids, $data) */ $targetAlbum = null; - /** + /* * An array of the updated songs. * * @var array diff --git a/app/Models/User.php b/app/Models/User.php index 2acb3cdb61..455ced0010 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -20,7 +20,7 @@ class User extends Authenticatable /** * The preferences that we don't want to show to the client. - * + * * @var array */ protected $hiddenPreferences = ['lastfm_session_key']; @@ -56,9 +56,9 @@ public function interactions() /** * Get a preference item of the current user. - * - * @param string $key - * + * + * @param string $key + * * @return string|null */ public function getPreference($key) @@ -70,7 +70,7 @@ public function getPreference($key) /** * Save a user preference. - * + * * @param string $key * @param string $val */ @@ -98,7 +98,7 @@ public function setPreference($key, $val) /** * Delete a preference. - * + * * @param string $key */ public function deletePreference($key) @@ -111,7 +111,7 @@ public function deletePreference($key) /** * Determine if the user is connected to Last.fm. - * + * * @return bool */ public function connectedToLastfm() @@ -121,7 +121,7 @@ public function connectedToLastfm() /** * Get the user's Last.fm session key. - * + * * @return string|null The key if found, or null if user isn't connected to Last.fm */ public function getLastfmSessionKey() diff --git a/app/Services/Lastfm.php b/app/Services/Lastfm.php index d0967ff518..c59e0206a2 100644 --- a/app/Services/Lastfm.php +++ b/app/Services/Lastfm.php @@ -10,21 +10,21 @@ class Lastfm extends RESTfulService { /** * Specify the response format, since Last.fm only returns XML. - * + * * @var string */ protected $responseFormat = 'xml'; /** * Override the key param, since, again, Lastfm wants to be different. - * + * * @var string */ protected $keyParam = 'api_key'; /** * Construct an instance of Lastfm service. - * + * * @param string $key Last.fm API key. * @param string $secret Last.fm API shared secret. * @param Client $client The Guzzle HTTP client. @@ -51,7 +51,7 @@ public function enabled() /** * Get information about an artist. - * + * * @param $name string Name of the artist * * @return object|false @@ -98,10 +98,10 @@ public function getArtistInfo($name) /** * Get information about an album. - * + * * @param string $name Name of the album * @param string $artistName Name of the artist - * + * * @return array|false */ public function getAlbumInfo($name, $artistName) @@ -154,11 +154,11 @@ public function getAlbumInfo($name, $artistName) /** * Get Last.fm's session key for the authenticated user using a token. - * + * * @param string $token The token after successfully connecting to Last.fm * * @link http://www.last.fm/api/webauth#4 - * + * * @return string The token key */ public function getSessionKey($token) @@ -181,13 +181,13 @@ public function getSessionKey($token) /** * Scrobble a song. - * + * * @param string $artist The artist name * @param string $track The track name * @param string|int $timestamp The UNIX timestamp * @param string $album The album name * @param string $sk The session key - * + * * @return bool */ public function scrobble($artist, $track, $timestamp, $album, $sk) @@ -211,12 +211,12 @@ public function scrobble($artist, $track, $timestamp, $album, $sk) /** * Love or unlove a track on Last.fm. - * + * * @param string $track The track name * @param string $artist The artist's name * @param string $sk The session key * @param bool $love Whether to love or unlove. Such cheesy terms... urrgggh - * + * * @return bool */ public function toggleLoveTrack($track, $artist, $sk, $love = true) @@ -235,13 +235,13 @@ public function toggleLoveTrack($track, $artist, $sk, $love = true) /** * Update a track's "now playing" on Last.fm. - * + * * @param string $artist Name of the artist * @param string $track Name of the track * @param string $album Name of the album * @param int|float $duration Duration of the track, in seconds * @param string $sk The session key - * + * * @return bool */ public function updateNowPlaying($artist, $track, $album, $duration, $sk) @@ -269,7 +269,7 @@ public function updateNowPlaying($artist, $track, $album, $duration, $sk) * - The API signature (api_sig). * * @link http://www.last.fm/api/webauth#5 - * + * * @param array $params The array of parameters. * @param bool $toString Whether to turn the array into a query string * @@ -307,9 +307,9 @@ public function buildAuthCallParams(array $params, $toString = false) /** * Correctly format a string returned by Last.fm. - * + * * @param string $str - * + * * @return string */ protected function formatText($str) diff --git a/app/Services/Util.php b/app/Services/Util.php index f0be5f903e..8fc6233871 100644 --- a/app/Services/Util.php +++ b/app/Services/Util.php @@ -15,7 +15,7 @@ public function __construct() /** * Detects higher UTF encoded strings. - * + * * @param string $str * * @return string|false diff --git a/tests/MediaTest.php b/tests/MediaTest.php index 70bb35b7a5..c5aa13858a 100644 --- a/tests/MediaTest.php +++ b/tests/MediaTest.php @@ -7,7 +7,6 @@ use App\Services\Media; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\WithoutMiddleware; -use Mockery as m; class MediaTest extends TestCase {