Showing 4,217 of 4,217 total issues
File yf_db.class.php
has 1493 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Database abstraction layer.
*
File languages.data.php
has 1475 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
0 => [
'code' => 'aa',
File languages.php
has 1475 lines of code (exceeds 250 allowed). Consider refactoring. 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
<?php
/*
# addon select: supplier_id
Function _filter_array
has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring. 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
<?php
/**
* Debug console.
*
Identical blocks of code found in 3 locations. Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 680.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 680.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 680.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File class_db_real_utils_mysql_test.Test.php
has 1343 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/db_real_abstract.php';
/**
yf_form2
has 165 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_form2
{
public $CLASS_FORM_MAIN = 'form-horizontal';// col-md-6'
public $CLASS_FORM_CONTROL = 'form-control';
public $CLASS_CKEDITOR = 'ckeditor';
Identical blocks of code found in 2 locations. Consider refactoring. Open
public function _recursive_get_methods_from_extends($file_text = '', $user_module_name = '', $_type = 'admin', $ONLY_PRIVATE_METHODS = false)
{
$extends_file_path = '';
$methods = [];
// TODO: connect plugins
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 615.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
public function _recursive_get_methods_from_extends($file_text = '', $user_module_name = '', $_type = 'admin', $ONLY_PRIVATE_METHODS = false)
{
$extends_file_path = '';
$methods = [];
// TODO: connect plugins
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 615.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File class_validate_test.Test.php
has 1212 lines of code (exceeds 250 allowed). Consider refactoring. 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
<?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
<?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
class yf_manage_shop
{
/** @var bool Filter on/off */
public $USE_FILTER = true;
/** @var string Folder where product's images store */
File yf_payment_api__provider_remote.class.php
has 1120 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if ( ! function_exists('array_replace_recursive')) {
trigger_error('Not exists function "array_replace_recursive ( PHP 5 >= 5.3.0 )"', E_USER_ERROR);
}
File yf_payment_api__provider_payeer.class.php
has 1119 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
_class('payment_api__provider_remote');
class yf_payment_api__provider_payeer extends yf_payment_api__provider_remote
File yf_common.class.php
has 1115 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Class where most common used functions are stored.
*