Showing 40 of 52 total issues
File alliances.php
has 545 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
101677770,
117383987,
Method handle
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$this->promptSetup();
$this->backups();
Method getUpgradeMapping
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'character_infos' => [
'characterID' => 'character_id',
Method upgrade
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function upgrade(string $target)
{
if (self::$alliance_ids == [])
self::$alliance_ids = include __DIR__ . '/../Config/alliances.php';
Method getUpgradeMapping
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'character_planet_pins' => [
'ownerID' => 'character_id',
Method getUpgradeMapping
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'character_killmails' => [
'characterID' => 'character_id',
Method getUpgradeMapping
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'corporation_member_trackings' => [
'corporationID' => 'corporation_id',
Method getUpgradeMapping
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'contract_details' => [
'contractID' => 'contract_id',
Method getUpgradeMapping
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'contract_details' => [
'contractID' => 'contract_id',
Method getUpgradeMapping
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'character_calendar_event_details' => [
'eventID' => 'event_id',
Method getUpgradeMapping
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'corporation_industry_jobs' => [
'corporationID' => 'corporation_id',
Method getUpgradeMapping
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'corporation_bookmarks' => [
'corporationID' => 'corporation_id',
Method getUpgradeMapping
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'character_industry_jobs' => [
'characterID' => 'character_id',
Method getUpgradeMapping
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping() : array
{
return [
'character_bookmarks' => [
'characterID' => 'character_id',
Function getSenderTypeAttribute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getSenderTypeAttribute()
{
if ((3000000 <= $this->senderID && $this->senderID <= 4000000) ||
(90000000 <= $this->senderID && $this->senderID <= 98000000))
return 'character';
- 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 getUpgradeMapping
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUpgradeMapping(): array
{
return [
'corporation_issued_medals' => [
'corporationID' => 'corporation_id',
Function upgrade
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function upgrade(string $target)
{
if (self::$alliance_ids == [])
self::$alliance_ids = include __DIR__ . '/../Config/alliances.php';
- 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 getRaceAttribute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getRaceAttribute($value)
{
if ($value == 'Gallente')
return 8;
- 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 getStatusAttribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getStatusAttribute($value)
{
if ($value == 'Completed')
return 'finished';
- 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
Avoid too many return
statements within this method. Open
return 'cancelled';