Showing 4,217 of 4,217 total issues
Method _external_response
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _external_response()
{
$operation_id = $_GET['operation_id'];
$secret = $_GET['secret'];
$payment_api = $this->payment_api;
Method _rewrite_replace_links
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _rewrite_replace_links($body = '', $standalone = false, $force_rewrite = false, $for_site_id = false)
{
if (MAIN_TYPE_ADMIN && ! $force_rewrite) {
return $body;
}
Method _search_autocomplete
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _search_autocomplete($options = [])
{
main()->NO_GRAPHICS = true;
// prepare options
$_ = &$options;
Method show_metatags
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show_metatags($meta = [])
{
if (empty($meta)) {
$meta = $this->META_DEFAULT;
}
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (_basic_auth_check($debug_users) || ! empty($_COOKIE[$cookie_name])) {
$h = array_reverse(explode('.', $_SERVER['HTTP_HOST']));
setcookie($cookie_name, '1', 0, '/', $h[1] . '.' . $h[0]); // Live for session, set for TLD
define('DEBUG_MODE', 1);
} else {
- 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 143.
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
if ( ! strlen($extra['value'])) {
if (isset($extra['selected'])) {
$value = $extra['selected'];
} elseif (isset($form->_params['selected'])) {
$value = $form->_params['selected'][$extra['name']];
- 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 143.
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
if ( ! strlen($extra['value'])) {
if (isset($extra['selected'])) {
$value = $extra['selected'];
} elseif (isset($form->_params['selected'])) {
$value = $form->_params['selected'][$extra['name']];
- 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 143.
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
if (_debug_auth_check($debug_users) || ! empty($_COOKIE[$cookie_name])) {
$h = array_reverse(explode('.', $_SERVER['HTTP_HOST']));
setcookie($cookie_name, '1', 0, '/', $h[1] . '.' . $h[0]); // Live for session, set for TLD
define('DEBUG_MODE', 1);
} else {
- 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 143.
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ($this->STORE_ADMIN_AUTH) {
db()->INSERT('log_admin_auth', [
'admin_id' => (int) ($A['id']),
'login' => _es($A['login']),
'group' => (int) ($A['group']),
- 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 143.
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ($this->STORE_USER_AUTH) {
db()->INSERT('log_auth', [
'user_id' => (int) ($A['id']),
'login' => _es($A['login']),
'group' => (int) ($A['group']),
- 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 143.
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 yf_other_common.class.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Other common methods container.
*
File yf_divide_pages.class.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Common used pager module.
*
Method user_vars
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function user_vars()
{
if (isset($_GET['id']) && ! isset($_GET['page'])) {
$_GET['page'] = $_GET['id'];
$_GET['id'] = null;
Method init
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
// Chanined config rule
if ($this->BLOCK_FAILED_LOGINS) {
$this->LOG_FAILED_LOGINS = true;
Method _do_login
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _do_login($params = [])
{
$AUTH_LOGIN = trim($params['login']);
$AUTH_PSWD = trim($params['pswd']);
Method show
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$this->refresh_modules_list($silent = true);
if (main()->is_post()) {
Method compile_insert
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile_insert($table, $data, $params = [])
{
if ( ! strlen($table) || ! is_array($data)) {
return false;
}
Method test_query_models
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_query_models()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_cleanup_split_trim
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_cleanup_split_trim()
{
$rules_raw = [
'test1,test2,test3' => 'min_length:2|max_length:12|is_unique:user.login|between:1,10|chars:a,b,c,d|regex:[a-z0-9]+',
];
Method test_where_basic
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_where_basic()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}