Showing 3,246 of 4,217 total issues
Function parse
has a Cognitive Complexity of 231 (exceeds 5 allowed). Consider refactoring. Open
Open
public function parse($sql)
{
$parsed = $this->parser->parse($sql);
$table_name = $parsed['TABLE']['no_quotes']['parts'][0] ?: '';
- 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
File class_db_offline_query_builder_test.Test.php
has 1711 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
require_once __DIR__ . '/db_offline_abstract.php';
/**
File countries.data.php
has 1711 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
0 => [
'c' => 'AD',
File yf_main.class.php
has 1660 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Core main class.
*
File yf_html.class.php
has 1654 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* HTML high-level controls collection.
*
File yf_db_query_builder_driver.class.php
has 1576 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Database query builder (Active Record).
*
File yf_db_utils_driver.class.php
has 1526 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* YF db utils driver abstract class.
*/
File sys_menu_items.data.php
has 1507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
1 => [
'id' => '1',
File yf_db.class.php
has 1493 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Database abstraction layer.
*
File languages.data.php
has 1475 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
0 => [
'code' => 'aa',
File languages.php
has 1475 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
$data = [
'ab' => [
'code' => 'ab',
File yf_manage_shop_import_products2.class.php
has 1473 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*
# addon select: supplier_id
Function _filter_array
has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring. Open
Open
public function _filter_array(&$data, $filter = [], $filter_params = [], $table = null)
{
if ( ! $data || ! $filter) {
return false;
}
- 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
File yf_debug.class.php
has 1386 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Debug console.
*
File class_db_real_utils_mysql_test.Test.php
has 1343 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
require_once __DIR__ . '/db_real_abstract.php';
/**
yf_form2
has 165 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class yf_form2
{
public $CLASS_FORM_MAIN = 'form-horizontal';// col-md-6'
public $CLASS_FORM_CONTROL = 'form-control';
public $CLASS_CKEDITOR = 'ckeditor';
File class_validate_test.Test.php
has 1212 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
require_once __DIR__ . '/yf_unit_tests_setup.php';
class class_validate_test extends yf\tests\wrapper
File yf_payment_api__provider_webmoney.class.php
has 1210 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
_class('payment_api__provider_remote');
class yf_payment_api__provider_webmoney extends yf_payment_api__provider_remote
File yf_payment_api__provider_interkassa.class.php
has 1208 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
_class('payment_api__provider_remote');
class yf_payment_api__provider_interkassa extends yf_payment_api__provider_remote
yf_manage_shop
has 147 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class yf_manage_shop
{
/** @var bool Filter on/off */
public $USE_FILTER = true;
/** @var string Folder where product's images store */