Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
Scrutinizer Auto-Fixer 2016-01-18 01:21:39 +00:00
parent 004c236ed4
commit d655d0a151
9 changed files with 122 additions and 116 deletions

View file

@ -22,7 +22,6 @@ namespace Poniverse\Ponyfm\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Response;
class DisabledAccountCheck
{

View file

@ -20,7 +20,6 @@
namespace Poniverse\Ponyfm\Http\Middleware;
use App;
use Closure;
use Cache;
use Config;

View file

@ -24,7 +24,6 @@ use Exception;
use Helpers;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Auth;
use Cache;
use Poniverse\Ponyfm\Contracts\Searchable;

View file

@ -24,7 +24,6 @@ use Auth;
use Cache;
use Config;
use DB;
use Elasticsearch;
use Poniverse\Ponyfm\Contracts\Searchable;
use Poniverse\Ponyfm\Exceptions\TrackFileNotFoundException;
use Poniverse\Ponyfm\Traits\IndexedInElasticsearchTrait;
@ -254,6 +253,9 @@ class Track extends Model implements Searchable
$query->join('mlpma_tracks', 'tracks.id', '=', 'mlpma_tracks.track_id');
}
/**
* @param integer $count
*/
public static function popular($count, $allowExplicit = false)
{
$trackIds = Cache::remember('popular_tracks'.$count.'-'.($allowExplicit ? 'explicit' : 'safe'), 5,
@ -658,6 +660,9 @@ class Track extends Model implements Searchable
return "{$this->title}.{$format['extension']}";
}
/**
* @return string
*/
public function getFileFor($format)
{
if (!isset(self::$Formats[$format])) {

View file

@ -238,7 +238,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
/**
* Returns true if this user has the given role.
*
* @param $roleName
* @param string $roleName
* @return bool
*/
public function hasRole($roleName)

View file

@ -87,6 +87,10 @@ class ProfileRequest
}
}
/**
* @param string $level
* @param string $message
*/
public function log($level, $message, $context)
{
$this->_data['log'][] = [