Showing 8 of 14 total issues
Method get_fantastico_list
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_fantastico_list()
{
$category = get_service_define('FANTASTICO');
$fantasticoIps = get_fantastico_licenses();
$ipdata = [];
Function reusable_fantastico
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function reusable_fantastico()
{
page_title('ReUsable Fantastico Licenses');
if ($GLOBALS['tf']->ima == 'admin') {
$module = 'licenses';
- 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 activate_fantastico
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function activate_fantastico($ipAddress, $type)
{
ini_set('max_execution_time', 1000); // just put a lot of time
ini_set('default_socket_timeout', 1000); // same
$db = get_module_db('licenses');
- 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 reusable_fantastico
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function reusable_fantastico()
{
page_title('ReUsable Fantastico Licenses');
if ($GLOBALS['tf']->ima == 'admin') {
$module = 'licenses';
Function get_available_fantastico
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function get_available_fantastico($type)
{
$db = get_module_db('licenses');
$settings = \get_module_settings('licenses');
$fantastico = new Fantastico(FANTASTICO_USERNAME, FANTASTICO_PASSWORD);
- 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 fantastico_licenses_list
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function fantastico_licenses_list()
{
if ($GLOBALS['tf']->ima == 'admin') {
$table = new \TFTable();
$table->set_title('Fantastico License List');
- 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 activate_fantastico
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function activate_fantastico($ipAddress, $type)
{
ini_set('max_execution_time', 1000); // just put a lot of time
ini_set('default_socket_timeout', 1000); // same
$db = get_module_db('licenses');
Function get_fantastico_list
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function get_fantastico_list()
{
$category = get_service_define('FANTASTICO');
$fantasticoIps = get_fantastico_licenses();
$ipdata = [];
- 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"