Skip to content

Commit

Permalink
Applied fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
phanan authored and StyleCIBot committed Mar 6, 2016
1 parent f1c5e14 commit 461480f
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 46 deletions.
4 changes: 2 additions & 2 deletions app/Events/SongLikeToggled.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions app/Events/SongStartedPlaying.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class SongStartedPlaying extends Event

/**
* The now playing song.
*
*
* @var Song
*/
public $song;

/**
* The user listening.
*
*
* @var User
*/
public $user;
Expand Down
8 changes: 4 additions & 4 deletions app/Http/Controllers/API/LastfmController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -96,7 +96,7 @@ public function setSessionKey(Request $request)

/**
* Disconnect the current user from Last.fm.
*
*
* @return \Illuminate\Http\JsonResponse
*/
public function disconnect()
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/API/PlaylistController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PlaylistController extends Controller
{
/**
* Gets all playlists by the current user.
*
*
* @return \Illuminate\Http\JsonResponse
*/
public function index()
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/API/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function login(UserLoginRequest $request)

/**
* Log the current user out.
*
*
* @return \Illuminate\Http\JsonResponse
*/
public function logout()
Expand Down
2 changes: 0 additions & 2 deletions app/Http/Requests/API/SongUpdateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace App\Http\Requests\API;

use App\Http\Requests\API\Request;

class SongUpdateRequest extends Request
{
/**
Expand Down
2 changes: 0 additions & 2 deletions app/Http/Streamers/TranscodingStreamer.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,5 @@ public function stream()
];

passthru("$ffmpeg ".implode($args, ' '));

return;
}
}
2 changes: 1 addition & 1 deletion app/Listeners/LoveTrackOnLastfm.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class LoveTrackOnLastfm
{
/**
* The Last.fm service instance, which is DI'ed into our listener.
*
*
* @var Lastfm
*/
protected $lastfm;
Expand Down
2 changes: 1 addition & 1 deletion app/Listeners/UpdateLastfmNowPlaying.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class UpdateLastfmNowPlaying
{
/**
* The Last.fm service instance.
*
*
* @var Lastfm
*/
protected $lastfm;
Expand Down
6 changes: 3 additions & 3 deletions app/Models/Song.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,23 @@ 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.
*
* @var Artist
*/
$targetArtist = null;

/**
/*
* The album that our songs will be associated to.
* If it can't be found, we'll create it.
*
* @var Album
*/
$targetAlbum = null;

/**
/*
* An array of the updated songs.
*
* @var array
Expand Down
16 changes: 8 additions & 8 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down Expand Up @@ -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)
Expand All @@ -70,7 +70,7 @@ public function getPreference($key)

/**
* Save a user preference.
*
*
* @param string $key
* @param string $val
*/
Expand Down Expand Up @@ -98,7 +98,7 @@ public function setPreference($key, $val)

/**
* Delete a preference.
*
*
* @param string $key
*/
public function deletePreference($key)
Expand All @@ -111,7 +111,7 @@ public function deletePreference($key)

/**
* Determine if the user is connected to Last.fm.
*
*
* @return bool
*/
public function connectedToLastfm()
Expand All @@ -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()
Expand Down
34 changes: 17 additions & 17 deletions app/Services/Lastfm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -51,7 +51,7 @@ public function enabled()

/**
* Get information about an artist.
*
*
* @param $name string Name of the artist
*
* @return object|false
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function __construct()

/**
* Detects higher UTF encoded strings.
*
*
* @param string $str
*
* @return string|false
Expand Down
1 change: 0 additions & 1 deletion tests/MediaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 461480f

Please sign in to comment.