Showing 50 of 284 total issues
Function run
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$channels = $this->db->query("SELECT * FROM killmailPosting");
foreach ($channels as $channel) {
- Read upRead up
- Create a ticketCreate a ticket
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 run
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
// Reap the threads!
$this->websocket->loop->addPeriodicTimer(600, function () {
$this->log->addInfo('Restarting the threading pool, to clear out old threads..');
- Create a ticketCreate a ticket
Function run
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$guildID = $this->message->full_channel->guild->id;
$input = explode(" ", $this->message->content);
unset($input[0]);
- Read upRead up
- Create a ticketCreate a ticket
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 run
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$guildID = $this->message->full_channel->guild->id;
$input = explode(" ", $this->message->content);
unset($input[0]);
- Create a ticketCreate a ticket
Method run
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
// Most EVE players on Discord use their ingame name, so lets support @highlights
$explode = explode(" ", $this->message->content);
unset($explode[0]);
- Create a ticketCreate a ticket
Function run
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$explode = explode(" ", $this->message->content);
$prefix = $this->channelConfig->prefix;
$system = isset($explode[0]) ? $explode[0] == "{$prefix}pc" ? "global" : str_replace($prefix, "", $explode[0]) : "global";
- Read upRead up
- Create a ticketCreate a ticket
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 run
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$pornConfig = @$this->channelConfig->porn;
// This is one of those plugins that need to be allowed before it works
- Create a ticketCreate a ticket
Method run
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$explode = explode(" ", $this->message->content);
$prefix = $this->channelConfig->prefix;
$system = isset($explode[0]) ? $explode[0] == "{$prefix}pc" ? "global" : str_replace($prefix, "", $explode[0]) : "global";
- Create a ticketCreate a ticket
Function run
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$pornConfig = @$this->channelConfig->porn;
// This is one of those plugins that need to be allowed before it works
- Read upRead up
- Create a ticketCreate a ticket
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 run
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$channels = $this->db->query("SELECT * FROM killmailPosting");
foreach ($channels as $channel) {
- Create a ticketCreate a ticket
Method run
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$explode = explode(" ", $this->message->content);
unset($explode[0]);
$name = implode(" ", $explode);
- Create a ticketCreate a ticket
File Sovereign.php
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Sovereign;
use Discord\Cache\Cache;
- Create a ticketCreate a ticket
Function run
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$explode = explode(" ", $this->message->content);
$cmd = isset($explode[1]) ? $explode[1] : null;
$plugins = (object)array_merge((array)$this->onMessagePlugins, (array)$this->onVoicePlugins);
- Read upRead up
- Create a ticketCreate a ticket
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 boot
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function boot()
{
$app = $this->getContainer()->get('app');
// onMessage plugins
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($message, $discord, $channelConfig, $log, $config, $db, $curl, $settings, $permissions, $serverConfig, $users, $extras)
- Create a ticketCreate a ticket