Showing 4,217 of 4,217 total issues
Method go
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function go()
{
if ($this->DEBUG_CONSOLE_HIDDEN) {
return false;
}
Method test_rewrite_replace_links
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_rewrite_replace_links()
{
$GLOBALS['PROJECT_CONF']['tpl']['REWRITE_MODE'] = true;
$host = self::$host;
File advertising.sql_php.php
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
Identical blocks of code found in 2 locations. Consider refactoring. Open
public function get($name, $ttl = 0, $params = [])
{
if ( ! $this->is_ready()) {
return null;
}
- 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 132.
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 get($name, $ttl = 0, $params = [])
{
if ( ! $this->is_ready()) {
return null;
}
- 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 132.
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
public function test_input_text_attr_data()
{
$this->assertEquals('<input name="name" type="text" id="name" class="form-control" placeholder="Name" data-something="5">', trim(self::form_no_chain($r)->text('name', ['data-something' => '5'])));
$this->assertEquals('<input name="name" type="text" id="name" class="form-control" placeholder="Name" data-a1="a11" data-b1="b11">', trim(self::form_no_chain($r)->text('name', ['data-a1' => 'a11', 'data-b1' => 'b11'])));
$this->assertEquals('<input name="name" type="text" id="name" class="form-control" placeholder="Name" data-test-escape="!@#$%^&*("'<>?><:;">', trim(self::form_no_chain($r)->text('name', ['data-test-escape' => '!@#$%^&*("\'<>?><:;'])));
- 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 132.
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
protected function _field_to_sql__category_name($field, $value, $action = null)
{
$cache = &$this->cache;
$result = null;
$name = $cache['category']['name'][mb_strtolower($value, 'UTF-8')];
- 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 132.
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
protected function _field_to_sql__supplier_name($field, $value, $action = null)
{
$cache = &$this->cache;
$result = null;
$name = $cache['supplier']['name'][mb_strtolower($value, 'UTF-8')];
- 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 132.
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
public function test_input_text_attr_ng()
{
$this->assertEquals('<input name="name" type="text" id="name" class="form-control" placeholder="Name" ng-something="5">', trim(self::form_no_chain($r)->text('name', ['ng-something' => '5'])));
$this->assertEquals('<input name="name" type="text" id="name" class="form-control" placeholder="Name" ng-a1="a11" ng-b1="b11">', trim(self::form_no_chain($r)->text('name', ['ng-a1' => 'a11', 'ng-b1' => 'b11'])));
$this->assertEquals('<input name="name" type="text" id="name" class="form-control" placeholder="Name" ng-test-escape="!@#$%^&*("'<>?><:;">', trim(self::form_no_chain($r)->text('name', ['ng-test-escape' => '!@#$%^&*("\'<>?><:;'])));
- 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 132.
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 _on_validate_ok
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _on_validate_ok($params = [], $form = null)
{
$p = $params ?: $_POST;
// TODO: named cleanups and separate stats by them
Method _add_panel
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _add_panel($options)
{
static $count = 1;
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// action
Method join
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function join($table, $on, $join_type = '', $is_select = false)
{
$join_types = [
'left',
'right',
Method remote_file_size
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function remote_file_size($url = '')
{
$url = $this->_fix_url($url);
$tmp = @parse_url($url);
$sch = $tmp['scheme'];
Method num2str
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function num2str($float, $currency_id = null, $lang_id = null, $set = false)
{
$lang_id = $this->lang_id($lang_id, $set);
$currency_id = $this->currency_id($currency_id, $set);
$words = &$this->words[$lang_id];
Method novaposhta_ua__import_old
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function novaposhta_ua__import_old()
{
// get data
// $file = '/tmp/warenhouses_ru.xls';
// $content = file_get_contents( $file );
Method edit
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function edit()
{
$a = $this->_get_info();
if ( ! $a) {
return _404();
Method test_decrement
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_decrement()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_increment
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_increment()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_complex
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_complex()
{
$this->assertEquals('', common()->_get_error_messages());
$old = $_SERVER['REQUEST_METHOD'];
yf_user_profile
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_user_profile extends yf_module
{
/** @var int */
public $MAX_SHOW_ADS = 10;
/** @var int */