mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-02-21 04:14:24 +01:00
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
parent
9a9ac7e5a1
commit
3b1b03e12b
43 changed files with 165 additions and 164 deletions
|
@ -27,7 +27,6 @@ use Poniverse\Ponyfm\Models\Image;
|
||||||
use Poniverse\Ponyfm\Models\Track;
|
use Poniverse\Ponyfm\Models\Track;
|
||||||
use Poniverse\Ponyfm\Models\TrackType;
|
use Poniverse\Ponyfm\Models\TrackType;
|
||||||
use Poniverse\Ponyfm\Models\User;
|
use Poniverse\Ponyfm\Models\User;
|
||||||
use Auth;
|
|
||||||
use DB;
|
use DB;
|
||||||
|
|
||||||
class EditTrackCommand extends CommandBase
|
class EditTrackCommand extends CommandBase
|
||||||
|
|
|
@ -30,7 +30,6 @@ use AudioCache;
|
||||||
use File;
|
use File;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use SplFileInfo;
|
use SplFileInfo;
|
||||||
use Validator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This command is the "second phase" of the upload process - once metadata has
|
* This command is the "second phase" of the upload process - once metadata has
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ParseTrackTagsCommand extends CommandBase
|
||||||
*
|
*
|
||||||
* @param int $artistId
|
* @param int $artistId
|
||||||
* @param string|null $albumName
|
* @param string|null $albumName
|
||||||
* @param null $coverId
|
* @param integer|null $coverId
|
||||||
* @return int|null
|
* @return int|null
|
||||||
*/
|
*/
|
||||||
protected function getAlbumId(int $artistId, $albumName, $coverId = null) {
|
protected function getAlbumId(int $artistId, $albumName, $coverId = null) {
|
||||||
|
|
|
@ -26,7 +26,6 @@ use Poniverse\Ponyfm\Models\Album;
|
||||||
use Poniverse\Ponyfm\Models\Playlist;
|
use Poniverse\Ponyfm\Models\Playlist;
|
||||||
use Poniverse\Ponyfm\Models\Track;
|
use Poniverse\Ponyfm\Models\Track;
|
||||||
use Poniverse\Ponyfm\Models\User;
|
use Poniverse\Ponyfm\Models\User;
|
||||||
use Symfony\Component\Console\Helper\ProgressBar;
|
|
||||||
|
|
||||||
class RebuildSearchIndex extends Command
|
class RebuildSearchIndex extends Command
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,11 +99,13 @@ class TracksController extends ApiControllerBase
|
||||||
return $this->notFound('Track not found!');
|
return $this->notFound('Track not found!');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$track->canView(Auth::user()))
|
if (!$track->canView(Auth::user())) {
|
||||||
return $this->notFound('Track not found!');
|
return $this->notFound('Track not found!');
|
||||||
|
}
|
||||||
|
|
||||||
if ($track->is_downloadable == false)
|
if ($track->is_downloadable == false) {
|
||||||
return $this->notFound('Track not found!');
|
return $this->notFound('Track not found!');
|
||||||
|
}
|
||||||
|
|
||||||
if (!in_array($format, Track::$CacheableFormats)) {
|
if (!in_array($format, Track::$CacheableFormats)) {
|
||||||
return $this->notFound('Format not found!');
|
return $this->notFound('Format not found!');
|
||||||
|
|
|
@ -398,6 +398,9 @@ class Album extends Model implements Searchable, Commentable, Favouritable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $key
|
||||||
|
*/
|
||||||
public function getCacheKey($key)
|
public function getCacheKey($key)
|
||||||
{
|
{
|
||||||
return 'album-'.$this->id.'-'.$key;
|
return 'album-'.$this->id.'-'.$key;
|
||||||
|
|
|
@ -24,7 +24,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Poniverse\Ponyfm\Contracts\Commentable;
|
use Poniverse\Ponyfm\Contracts\Commentable;
|
||||||
use Poniverse\Ponyfm\Contracts\GeneratesNotifications;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Poniverse\Ponyfm\Models\Comment
|
* Poniverse\Ponyfm\Models\Comment
|
||||||
|
|
Loading…
Reference in a new issue