Showing 4,217 of 4,217 total issues
Method test_basic
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_basic()
{
$table = table();
$this->assertEquals('<div class="alert alert-info">No records</div>', trim($table));
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function test_where_exists()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
- 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 120.
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_union()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
- 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 120.
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_union_all()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
- 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 120.
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_where_not_exists()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
- 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 120.
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 time_box($name = '', $values = [], $extra = [], $replace = [])
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$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 120.
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 date_box($name = '', $values = [], $extra = [], $replace = [])
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$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 120.
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 li_tree
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function li_tree($data = [], $extra = [])
{
$extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
if ($data) {
$data = $this->_parent->_recursive_sort_items($data);
Function payout
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
payout: function( options ) {
var $this = this;
$scope.block_wait = true;
$scope.is_submitted = true;
$scope.status = false;
Method _render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _render($result)
{
$asset_class = _class('assets');
$asset_class->clean_all();
$asset_class->ADD_IS_DIRECT_OUT = true;
Method submit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function submit($name = '', $value = '', $extra = [], $replace = [])
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = '';
Method active_box
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function active_box($name = '', $desc = '', $extra = [], $replace = [])
{
if (is_array($name)) {
$extra += $name;
$desc = '';
Method _compile_prepare_cond
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _compile_prepare_cond($cond = '', $for_right = false)
{
$cond = trim($cond);
$_array_magick = [
'_key' => '$_k',
Method process
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process($options = null, $initialize = true, $error_messages = null)
{
$this->options = [
'upload_dir' => INCLUDE_PATH . 'uploads/' . $_GET['object'] . '/',
'upload_url' => WEB_PATH . 'uploads/' . $_GET['object'] . '/',
Method shell_exec
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function shell_exec($server_info = [], $cmd = '')
{
if ( ! $this->_INIT_OK || ! $cmd || ! $server_info) {
return false;
}
Method _order_step_start
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _order_step_start($FORCE_DISPLAY_FORM = false)
{
module('shop')->_basket_save();
$basket_contents = module('shop')->_basket_api()->get_all();
Method _attributes_save
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _attributes_save($object_id = 0)
{
if (empty($object_id)) {
return;
}
Method novaposhta_ua__import
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function novaposhta_ua__import()
{
// get data
// *** local
// $file = '/tmp/JsonWarehouseList.json';
Method xss_clean
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function xss_clean($str, $is_image = false)
{
// Is the string an array?
if (is_array($str)) {
while (list($key) = each($str)) {
Method _find_site
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _find_site($sites_dir = '')
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
if ( ! $sites_dir) {
$try_paths = [