Showing 1,326 of 1,561 total issues
File ApiV1Controller.php
has 3183 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers\Api;
use App\Avatar;
File AdminReportController.php
has 1282 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers\Admin;
use App\AccountInterstitial;
File Inbox.php
has 1135 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Util\ActivityPub;
use Cache, DB, Log, Purify, Redis, Storage, Validator;
File home.blade.php
has 888 lines of code (exceeds 250 allowed). Consider refactoring. Open
@extends('admin.partial.template-full')
@section('section')
<div class="title mb-4">
<h3 class="font-weight-bold">Diagnostics</h3>
File DirectMessageController.php
has 796 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers;
use Auth, Cache;
File AdminSettingsController.php
has 776 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers\Admin;
use App\Models\ConfigCache;
File ApiV1Dot1Controller.php
has 765 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers\Api;
use App\AccountLog;
File AdminApiController.php
has 726 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
File Helpers.php
has 718 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Util\ActivityPub;
use App\Instance;
File PublicApiController.php
has 705 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
File ComposeController.php
has 688 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers;
use App\Collection;
Function accountUpdateCredentials
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
public function accountUpdateCredentials(Request $request)
{
abort_if(! $request->user() || ! $request->user()->token(), 403);
abort_unless($request->user()->tokenCan('write'), 403);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function resolveQuery
has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring. Open
protected function resolveQuery()
{
$default = [
'accounts' => [],
'hashtags' => [],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function statusFirstOrFetch
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
public static function statusFirstOrFetch($url, $replyTo = false)
{
$url = self::validateUrl($url);
if ($url == false) {
return;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File polyfill.js
has 634 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Blob.js
* A Blob, File, FileReader & URL implementation.
* 2019-04-19
*
* By Eli Grey, http://eligrey.com
File RemoteAuthController.php
has 605 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers;
use App\Models\RemoteAuth;
Function reportsApiRemoteHandle
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
public function reportsApiRemoteHandle(Request $request)
{
$this->validate($request, [
'id' => 'required|exists:remote_reports,id',
'action' => 'required|in:mark-read,cw-posts,unlist-posts,delete-posts,private-posts,mark-all-read-by-domain,mark-all-read-by-username,cw-all-posts,private-all-posts,unlist-all-posts'
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method browse
has 253 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function browse(Request $request)
{
$this->validate($request, [
'a' => 'nullable|string|in:inbox,sent,filtered',
'page' => 'nullable|integer|min:1|max:99'
File AccountController.php
has 570 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Http\Controllers;
use Auth;
Method timelinePublic
has 234 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function timelinePublic(Request $request)
{
$this->validate($request, [
'min_id' => 'nullable|integer|min:0|max:'.PHP_INT_MAX,
'max_id' => 'nullable|integer|min:0|max:'.PHP_INT_MAX,