Showing 4,217 of 4,217 total issues
Method create_models
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create_models()
{
try {
$this->assertFalse(class_exists('bears'));
$this->assertFalse(class_exists('fish'));
Method dd_table
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function dd_table($replace = [], $field_types = [], $extra = [])
{
$extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
if (DEBUG_MODE) {
$ts = microtime(true);
Method user_var_push
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function user_var_push($FORCE_ID = false)
{
$_GET['id'] = (int) ($FORCE_ID ? $FORCE_ID : $_GET['id']);
$A = db()->query_fetch('SELECT * FROM ' . db('locale_user_tr') . ' WHERE id=' . (int) ($_GET['id']));
if ( ! $A) {
Method edit_item
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function edit_item()
{
$item_info = db()->query_fetch('SELECT * FROM ' . db('menu_items') . ' WHERE id=' . (int) ($_GET['id']));
if (empty($item_info['id'])) {
return _e('No such menu item!');
Method _do_login_with_encrypted
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _do_login_with_encrypted()
{
header('X-Robots-Tag: noindex,nofollow,noarchive,nosnippet');
if ( ! $_GET['id'] || strlen($_GET['id']) < 16 || is_numeric($_GET['id'])) {
$this->_encrypted_error = 'GET_id is not like an encrypted string';
Method send
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function send(array $params = [], &$error_message = '')
{
require_php_lib('mandrill');
try {
Method _check
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _check($input = [], $user_info = [])
{
// Default banned status
$BANNED_STATUS = false;
// Nothing to check
Method show_orders
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show_orders()
{
if ($this->SUPPLIER_ID) {
$sql = 'SELECT o.*, COUNT(*) AS num_items
FROM ' . db('shop_orders') . ' AS o
Method orders
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function orders()
{
if ( ! main()->USER_ID) {
if (main()->is_post()) {
module('shop')->order_validate_data();
Method drag_items
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function drag_items()
{
$cat_info = db()->get('SELECT * FROM ' . db('categories') . ' WHERE name="' . db()->es($_GET['id']) . '" OR id=' . (int) ($_GET['id']));
if ( ! $cat_info) {
return _e('No such category');
Method show_image
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show_image($no_header = false, $no_exit = false)
{
if (function_exists('main')) {
main()->NO_GRAPHICS = true;
}
Method show
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$id = preg_replace('~[^a-z0-9_-]+~ims', '', $_GET['id']);
$method = preg_replace('~[^a-z0-9_-]+~ims', '', $_GET['page']);
if (strlen($id)) {
Method test_update
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_update()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_many_to_many
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_many_to_many()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_php_to_sql_db_installer
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_php_to_sql_db_installer()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_recusrion3
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_recusrion3()
{
$jquery_url = _class('assets')->get_asset('jquery', 'js');
$url = $jquery_url;
$url1 = $url . '?v=1';
Identical blocks of code found in 5 locations. Consider refactoring. Open
public function _url($options, $is_server = false)
{
if ( ! $this->ENABLE) {
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 121.
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 5 locations. Consider refactoring. Open
public function _url($options, $is_server = false)
{
if ( ! $this->ENABLE) {
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 121.
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 5 locations. Consider refactoring. Open
public function _url($options, $is_server = false)
{
if ( ! $this->ENABLE) {
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 121.
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
public function display($params = [])
{
if (is_string($params)) {
$name = $params;
}
- 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 121.
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