Showing 3,246 of 4,217 total issues
Method api_payout
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
File yf_payment_api__provider_bitpay.class.php
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
_class('payment_api__provider_remote');
class yf_payment_api__provider_bitpay extends yf_payment_api__provider_remote
Method balance
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function balance()
{
$object = &$this->object;
$action = &$this->action;
$filter_name = &$this->filter_name;
Function error_handler
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function error_handler($error_type, $error_msg, $error_file, $error_line)
{
// quickly turn off notices logging
if ($this->NO_NOTICES && ($error_type == E_NOTICE || $error_type == E_USER_NOTICE)) {
return true;
- 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 having
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function having()
{
$sql = '';
$where = func_get_args();
if ( ! count((array) $where)) {
- 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 order_by
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function order_by()
{
$sql = '';
$items = func_get_args();
$count = count((array) $items);
- 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 show
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$i = preg_replace('~[^a-z0-9_-]+~ims', '', trim($_GET['i'])); // instance
$g = preg_replace('~[^a-z0-9_-]+~ims', '', trim($_GET['g'])); // group
$t = preg_replace('~[^a-z0-9_-]+~ims', '', trim($_GET['t'])); // type
- 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 _upload_item__import_action_test
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
protected function _upload_item__import_action_test($options)
{
$_ = $options;
$fields = $_['fields'];
$keys = $_['keys'];
- 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 _get_grid
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function _get_grid($data = [])
{
$rows = [];
foreach ((array) $data as $row_id => $row_items) {
$cols = '';
- 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 _get_grid
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function _get_grid($data = [])
{
foreach ((array) $data as $row_id => $row_items) {
$cols = '';
if (isset($row_items['cols']) && is_array($row_items['cols'])) {
- 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 _do_check_data_is_valid
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function _do_check_data_is_valid($rules = [], &$data)
{
$validate_ok = true;
$_all = '__all__';
if (isset($rules[$_all])) {
- 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
class_db_real_mysql_test
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
class class_db_real_mysql_test extends db_real_abstract
{
public static function db_name()
{
return self::$DB_NAME;
Function compile_insert
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function compile_insert($table, $data, $params = [])
{
if ( ! strlen($table) || ! is_array($data)) {
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
Method _operation_check
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _operation_check($options = null)
{
$result = [];
$data = [];
// options
File yf_db_ddl_parser_mysql.class.php
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_db_ddl_parser_mysql
{
File class_rewrite_testing_shared.php
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/yf_unit_tests_setup.php';
class class_rewrite_testing_shared extends yf\tests\wrapper
{
Method test_multi_select
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_multi_select()
{
$html = html();
$def_class = $html->CLASS_SELECT_BOX;
$def_opt_class = $html->CLASS_SELECT_OPTION_DEFAULT;
Method test_config
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_config()
{
$fake_lib1_url = _class('assets')->get_asset('jquery', 'js');
$fake_lib1 = [
'versions' => [
Function _check_block_rights
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public function _check_block_rights($block_id = 0, $OBJECT = '', $ACTION = '')
{
if (empty($block_id) || empty($OBJECT)) {
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
Function select
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public function select()
{
$sql = '';
$fields = func_get_args();
if ( ! count((array) $fields) || $fields === []) {
- 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"