Showing 3,246 of 4,217 total issues
File yf_manage_sphinx.class.php
has 550 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// TODO: connect subclasses from manage_sphinx/, do refactoring from subclasses into closures
class yf_manage_sphinx
Method product_edit
has 229 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function product_edit()
{
$id = (int) $_GET['id'];
$_GET['id'] = $id;
if (empty($id)) {
File yf_cache.class.php
has 545 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Caching layer.
*
Function repair
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
public function repair($sql, $db_error, $db)
{
$sql = trim($sql);
// #1191 Can't find FULLTEXT index matching the column list
if (in_array($db_error['code'], [1191]) && $this->RESTORE_FULLTEXT_INDEX) {
- 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
yf_payment_test
has 61 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_payment_test
{
public $api = [
// 'Privat24' => true,
// 'LiqPay' => true,
yf_wrapper_ethereum
has 61 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_wrapper_ethereum
{
public $host = '127.0.0.1';
public $port = 8545;
public $version = '2.0';
Method change_location
has 219 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function change_location()
{
if ( ! main()->USE_GEO_IP) {
return false;
}
Function _external_response
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function _external_response($options)
{
$operation_id = $options['operation_id'];
$payment_code = $options['code'] ?: '';
$address = $options['address'] ?: '';
- 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 tasks
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function tasks($allowed_check = false)
{
$main = main();
if ($main->is_console() || $main->is_ajax()) {
$main->no_graphics(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 login
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function login($provider, $params = [])
{
if ( ! $provider) {
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 sys_log_img_resizes.sql_php.php
has 526 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
Function add
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
public function add($content, $asset_type = 'bundle', $content_type_hint = 'auto', $params = [])
{
if (DEBUG_MODE) {
$trace = main()->trace_string();
}
- 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_file_manager.class.php
has 521 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* File manager module.
*
yf_core_api
has 59 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_core_api
{
public $section_paths = [
'core' => 'classes/',
'user' => 'modules/',
yf_shop
has 59 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_shop extends yf_module
{
/* Test CC numbers:
370000000000002 American Express Test Card
File class_form_test.Test.php
has 519 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/yf_unit_tests_setup.php';
Function auto
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
public function auto($table = '', $id = '', $params = [], $form)
{
if ($params['links_add']) {
$form->_params['links_add'] = $params['links_add'];
}
- 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_test
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
protected function _upload_item__import_test($options)
{
// load import data
$_ = $options;
$id = $_['id'];
- 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_methods
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
public function _get_methods($params = [])
{
$ONLY_PRIVATE_METHODS = [];
if (isset($params['private'])) {
$ONLY_PRIVATE_METHODS = $params['private'];
- 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_offline_query_builder_test
has 58 functions (exceeds 20 allowed). Consider refactoring. Open
class class_db_offline_query_builder_test extends db_offline_abstract
{
public function test_select_star()
{
if ($this->_need_skip_test(__FUNCTION__)) {