Showing 186 of 479 total issues
Function _group
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_group: function ( level, rows ) {
var fns = $.isArray( this.c.dataSrc ) ? this.c.dataSrc : [ this.c.dataSrc ];
var fn = DataTable.ext.oApi._fnGetObjectDataFn( fns[ level ] );
var dt = this.s.dt;
var group, last;
Method index
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index(Request $request)
{
$squads = Squad::with('members', 'moderators', 'applications');
if ($request->has('filters')) {
Method store
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function store(ProbeReport $request)
{
$report = $request->input('moon-report');
// enforce tabulation spacer
Method getStarbaseModules
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getStarbaseModules(int $corporation_id, int $starbase_id): Collection
{
// retrieving starbase location
$starbase = CorporationStarbase::where('starbase_id', $starbase_id)
Method handleJobDispatch
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function handleJobDispatch(Collection $job_classes, Request $request)
{
$job_classes->each(function ($class) use ($request) {
switch (true) {
Method postUpdateSharelink
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function postUpdateSharelink(Sharelink $request)
{
// Validate our character id is valid for the submitting user
if ((int) $request->input('user_sharelink_character_id') !== 0) {
$requested_character = auth()->user()->characters->contains((int) $request->input('user_sharelink_character_id'));
Method ajax
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ajax()
{
return datatables()
->eloquent($this->applyScopes($this->query()))
->editColumn('name', function ($row) {
Method characterTopWalletTransactionInteractions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function characterTopWalletTransactionInteractions(Collection $character_ids): Builder
{
return CharacterWalletTransaction::select('client_id', 'category', 'entity_id as party_id', 'name as party_name', DB::raw('count(*) as total'),
DB::raw("
Method addCorporationPermissionScope
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function addCorporationPermissionScope($query, string $ability)
{
if (auth()->user()->isAdmin())
return $query;
Method add_view_composers
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function add_view_composers()
{
// User information view composer
$this->app['view']->composer([
Method getSystems
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSystems(Request $request)
{
if ($request->query('_type', 'query') == 'find') {
$system = SolarSystem::find($request->query('q', 0));
Method rules
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rules()
{
// Start with a default rules array for the
// role_id check
Method register_policies
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function register_policies()
{
$permissions = config('seat.permissions', []);
Gate::define('global.superuser', 'Seat\Web\Acl\Policies\GlobalPolicy@superuser');
Function draw
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function draw(Model $row)
{
if ($row->location_type == 'station')
return $row->station->name;
- 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 postAddStandingsFromCorpOrChar
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function postAddStandingsFromCorpOrChar(StandingsExistingElementAdd $request)
{
// Get the standings profile that will be updated.
$standings_profile = StandingsProfile::find($request->input('id'));
- 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 checkLoginToken
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function checkLoginToken(string $token)
{
// Fetch token from DB, if we can.
$token = UserSharelink::find($token);
- 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 getEntities
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getEntities(Request $request)
{
$this->validate($request, [
'type' => 'in:characters,corporations,alliances',
- 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 getCorporationLedgerByMonth
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function getCorporationLedgerByMonth(int $corporation_id,
string $group_field,
array $ref_types,
?int $year = null,
?int $month = null): Collection
Function store
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function store(ProbeReport $request)
{
$report = $request->input('moon-report');
// enforce tabulation spacer
- 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 getStandingsAjaxElementName
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getStandingsAjaxElementName(Request $request)
{
$response = [
'results' => [],
- 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"