Showing 4,217 of 4,217 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ($plugin_name) {
$tmp = APP_PATH . 'plugins/' . $plugin_name . '/' . ADMIN_MODULES_DIR . $module_name . YF_CLS_EXT;
if (file_exists($tmp)) {
$file_names['admin_app_plugin'] = $tmp;
}
- 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 131.
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 ($plugin_name) {
$tmp = APP_PATH . 'plugins/' . $plugin_name . '/' . USER_MODULES_DIR . $module_name . YF_CLS_EXT;
if (file_exists($tmp)) {
$file_names['app_plugin'] = $tmp;
}
- 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 131.
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
Method _process_sub_patterns
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _process_sub_patterns($text = '', $args = [])
{
if (false === strpos($text, '{') || ! is_array($args)) {
return $text;
}
Method phone_box
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function phone_box($name = 'phone', $values = [], $selected = '', $extra = [])
{
if (is_array($name)) {
$extra = (array) $extra + $name;
} else {
Method select2_box
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function select2_box($name, $values = [], $selected = '', $extra = [])
{
$css = [];
$style = [];
if (is_array($name)) {
Method show
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$object = &$this->object;
$action = &$this->action;
$filter_name = &$this->filter_name;
Method rates
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rates($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// var
Method _build
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _build($a, $class_rewrite)
{
$u = false;
if ( ! empty($class_rewrite->BUILD_RULES)) {
foreach ((array) $class_rewrite->BUILD_RULES as $func) {
File yf_make_thumb.class.php
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Generating thumbs from images handler.
*
Method _process_text
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _process_text($body = '', $no_smilies = false, $smilies_as_image = false)
{
if (empty($body)) {
return '';
}
Method _view_widget_items
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _view_widget_items($name_ids = [], $items_configs = [])
{
$list_of_hooks = $this->_get_available_widgets_hooks();
$_orig_object = $_GET['object'];
Method test_yf_db_installer_sharding
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_yf_db_installer_sharding()
{
$bak['ERROR_AUTO_REPAIR'] = self::db()->ERROR_AUTO_REPAIR;
self::db()->ERROR_AUTO_REPAIR = true;
Method _city_select
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _city_select($params = [])
{
$STPL_NAME = 'register/city_select';
if ( ! empty($params['stpl_name'])) {
$STPL_NAME = $params['stpl_name'];
Method _add_bundle
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _add_bundle($_content, $_params = [])
{
if ( ! $_content) {
return false;
}
Method validate
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function validate($options)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// check payment method, type
Method _form_options
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _form_options($options)
{
if ( ! $this->ENABLE) {
return null;
}
Method _api_user_select_box
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _api_user_select_box($options = null)
{
// etc
$api = _class('api');
$api->JSON_VULNERABILITY_PROTECTION = false;
Identical blocks of code found in 4 locations. Consider refactoring. Open
public function _get_methods_names_from_text($text = '', $ONLY_PRIVATE_METHODS = false)
{
$methods = [];
if (empty($text)) {
return $methods;
- 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 130.
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 4 locations. Consider refactoring. Open
public function _get_methods_names_from_text($text = '', $ONLY_PRIVATE_METHODS = false)
{
$methods = [];
if (empty($text)) {
return $methods;
- 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 130.
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 4 locations. Consider refactoring. Open
public function _get_methods_names_from_text($text = '', $ONLY_PRIVATE_METHODS = false)
{
$methods = [];
if (empty($text)) {
return $methods;
- 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 130.
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