Showing 1,326 of 1,561 total issues
Method mediaUpdate
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function mediaUpdate(Request $request, $id)
{
abort_if(! $request->user() || ! $request->user()->token(), 403);
abort_unless($request->user()->tokenCan('write'), 403);
Method getUserCollections
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getUserCollections(Request $request, int $id)
{
$user = $request->user();
$pid = $user ? $user->profile_id : null;
$follows = false;
Method searchAPI
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function searchAPI(Request $request)
{
$this->validate($request, [
'q' => 'required|string|min:3|max:120',
'src' => 'required|string|in:metro',
Method content
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function content()
{
$report = $this->report;
$object_type = last(explode("\\", $this->report->object_type));
$reporter = AccountService::get($report->profile_id, true);
Method handle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$this->info(' ____ _ ______ __ ');
$this->info(' / __ \(_) _____ / / __/__ ____/ / ');
$this->info(' / /_/ / / |/_/ _ \/ / /_/ _ \/ __ / ');
Method handle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$id = $this->argument('id');
$force = $this->option('force');
Method handleAcceptActivity
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handleAcceptActivity()
{
$actor = $this->payload['object']['actor'];
$obj = $this->payload['object']['object'];
$type = $this->payload['object']['type'];
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$like = $this->like;
$status = $this->like->status;
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$follower = $this->follower;
$actor = $follower->actor;
$target = $follower->target;
Method normalizeAudience
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function normalizeAudience($data, $localOnly = true)
{
if (! isset($data['to'])) {
return;
}
Method getMastodonClient
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getMastodonClient($domain)
{
if(RemoteAuthInstance::whereDomain($domain)->exists()) {
return RemoteAuthInstance::whereDomain($domain)->first();
}
Method searchTag
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function searchTag(Request $request)
{
abort_if(! $request->user(), 403);
$this->validate($request, [
Method updateAppeal
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateAppeal(Request $request, $id)
{
$this->validate($request, [
'action' => 'required|in:dismiss,approve',
]);
Method discoverAccountsPopular
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function discoverAccountsPopular(Request $request)
{
abort_if(! $request->user(), 403);
$pid = $request->user()->profile_id;
Method store
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store(Request $request)
{
$this->validate($request, [
'item' => 'required|integer|min:1',
]);
Method inAppRegistrationConfirm
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function inAppRegistrationConfirm(Request $request)
{
abort_if($request->user(), 404);
abort_unless((bool) config_cache('pixelfed.open_registration'), 404);
abort_unless((bool) config_cache('pixelfed.allow_app_registration'), 404);
Method conciergeStore
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function conciergeStore(Request $request)
{
abort_if($request->user(), 404);
$rules = [
'sid' => 'required_if:action,email|integer|min:1|max:20000000',
Method mediaSettings
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function mediaSettings()
{
$this->line('');
$this->info('Media Settings:');
$optimize_media = $this->choice('Optimize media uploads? Requires jpegoptim and other dependencies!', ['false', 'true'], 1);
Method installerSteps
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function installerSteps()
{
$this->envCheck();
$this->envCreate();
$this->installType();
Method handle
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(): void
{
$sid = $this->sid;
$status = StatusService::get($sid, false);