Showing 25 of 90 total issues
Function secondsToTime
has a Cognitive Complexity of 118 (exceeds 5 allowed). Consider refactoring. Open
function secondsToTime ($seconds, $contract = TRUE) {
if (!empty($seconds)) {
$dtF = new DateTime("@0");
$dtT = new DateTime("@$seconds");
if ($contract) {
- 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
File lolmewnStats.php
has 914 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace BlueStats\Plugin;
use BlueStats\API\plugin;
- Create a ticketCreate a ticket
File Statz.php
has 798 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace BlueStats\Plugin;
use BlueStats\API\plugin;
- Create a ticketCreate a ticket
File McMMO.php
has 433 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace BlueStats\Plugin;
use BlueStats\API\plugin;
- Create a ticketCreate a ticket
Method secondsToTime
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
function secondsToTime ($seconds, $contract = TRUE) {
if (!empty($seconds)) {
$dtF = new DateTime("@0");
$dtT = new DateTime("@$seconds");
if ($contract) {
- Create a ticketCreate a ticket
Function player
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function player ($player, $stat, $options = []) {
$mysqli = $this->mysql;
$stmt = $mysqli->stmt_init();
- 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
Function tableToHTML
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function tableToHTML ($sorted = TRUE) {
$cellsY = count($this->data);
$cellsX = $this->biggestRow;
$string = "<table class='table'>\n";
if ($sorted)
- 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 GetStatus
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function GetStatus ($Challenge) {
$Data = $this->WriteData(self :: STATISTIC, $Challenge . Pack('c*', 0x00, 0x00, 0x00, 0x00));
if (!$Data) {
throw new MinecraftQueryException('Failed to receive status.');
}
- Create a ticketCreate a ticket
Method render
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render ($type = "GLOBAL") {
// Get template file to render
$filePath = $this->viewPath . "templates/{$this->page}.html";
- Create a ticketCreate a ticket
Method player
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function player ($player, $stat, $options = []) {
$mysqli = $this->mysql;
$stmt = $mysqli->stmt_init();
- Create a ticketCreate a ticket
Function GetStatus
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function GetStatus ($Challenge) {
$Data = $this->WriteData(self :: STATISTIC, $Challenge . Pack('c*', 0x00, 0x00, 0x00, 0x00));
if (!$Data) {
throw new MinecraftQueryException('Failed to receive status.');
}
- 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
Function getTemplate
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function getTemplate ($filePath) {
if (file_exists($filePath)) {
/* Load template file */
$content = file_get_contents($filePath);
- 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
Function render
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function render ($type = "GLOBAL") {
// Get template file to render
$filePath = $this->viewPath . "templates/{$this->page}.html";
- 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 tableToHTML
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function tableToHTML ($sorted = TRUE) {
$cellsY = count($this->data);
$cellsX = $this->biggestRow;
$string = "<table class='table'>\n";
if ($sorted)
- Create a ticketCreate a ticket
Function statList
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function statList ($stat, $limit, $options = []) {
$mysqli = $this->mysql;
$stmt = $mysqli->stmt_init();
$aggregateColumn = "";
- 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
Function sum
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function sum($stat) {
$mysqli = $this->mysql;
$stmt = $mysqli->stmt_init();
$aggregateColumn = "";
- 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 statList
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function statList ($stat, $limit, $options = []) {
$mysqli = $this->mysql;
$stmt = $mysqli->stmt_init();
$aggregateColumn = "";
- Create a ticketCreate a ticket
Method sum
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sum($stat) {
$mysqli = $this->mysql;
$stmt = $mysqli->stmt_init();
$aggregateColumn = "";
- Create a ticketCreate a ticket
Function set
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function set ($option, $value, $plugin = "this") {
$value = json_encode($value);
if ($plugin == "this")
$plugin = $this->pluginName;
$mysqli = $this->BlueStatsMYQLI;
- 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
Function reCache
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function reCache ($name) {
if ($this->config->get("enabled") == "true" && !isset($_GET["recache"])) {
$file_name = md5($name) . '.json';
if (file_exists($this->cache_dir . $file_name)) {
$file = file_get_contents($this->cache_dir . $file_name);
- 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"