Showing 4,217 of 4,217 total issues
yf_db_utils_pgsql
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_db_utils_pgsql extends yf_db_utils_driver
{
public function _get_supported_field_types()
{
// TODO
yf_dynamic
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_dynamic
{
/** @var bool */
public $ERROR_IMAGE_INTERNAL = false;
/** @var bool */
class_db_real_query_builder_mysql_test
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class class_db_real_query_builder_mysql_test extends db_real_abstract
{
public static function _need_skip_test($name)
{
if (defined('HHVM_VERSION') && getenv('TRAVIS') && getenv('CONTINUOUS_INTEGRATION')) {
Method multi_select
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function multi_select($name, $values = [], $selected = '', $show_text = false, $type = 2, $add_str = '', $translate = 0, $level = 0, $disabled = false)
{
// Passing params as array
if (is_array($name)) {
$extra = (array) $extra + $name;
Method connect
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function connect($db_host = '', $db_user = '', $db_pswd = null, $db_name = null, $force = false, $params = [])
{
if (is_array($db_host)) {
$params = $db_host;
$db_host = '';
Method _try_to_find
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _try_to_find($input_name = '', $CUR_CHECKS = [], $where_search = '')
{
// Default value
$IS_FOUND = false;
$WHAT_FOUND = '';
Method _order_create
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _order_create()
{
if (empty($_POST)) {
return false;
}
Method go
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function go()
{
if ( ! db()->QUERY_LOG) {
return false;
}
Method tree
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function tree()
{
return _class('html')->tree([
11 => [
'name' => 'Tools',
Method menu
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function menu()
{
return _class('html')->menu([
11 => [
'name' => 'Tools',
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (in_array('file', $this->LOG_DRIVER)) {
$data['output_cache'] = '0'; // mean: exec full mode (not from output cache)
$log_file_path = STORAGE_PATH . $this->LOG_DIR_NAME . 'log_exec_' . gmdate('Y-m-d') . '.log';
$log_dir_path = dirname($log_file_path);
if ( ! file_exists($log_dir_path)) {
- 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 137.
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 (in_array('file', $this->LOG_DRIVER)) {
$data['output_cache'] = '0'; // mean: exec full mode (not from output cache)
$log_file_path = STORAGE_PATH . $this->LOG_DIR_NAME . 'log_exec_' . gmdate('Y-m-d') . '.log';
$log_dir_path = dirname($log_file_path);
if ( ! file_exists($log_dir_path)) {
- 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 137.
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 add_user($name, array $data, $extra = [], &$error = false)
{
list($host, $user) = explode('@', $name);
// TODO: allow add only password in addition to host and user
// return $this->db->insert('mysql.user WHERE user='.$this->_escape_val($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 137.
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 update_user($name, array $data, $extra = [], &$error = false)
{
list($host, $user) = explode('@', $name);
// TODO: allow update only password
// return $this->db->update('mysql.user WHERE user='.$this->_escape_val($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 137.
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 radio_box
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function radio_box($name, $values = [], $selected = '', $horizontal = true, $type = 2, $add_str = '', $translate = 0)
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = $extra['name'];
Method get_asset_from_bower
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_asset_from_bower($name, $version = 'master', $asset_data = [], $asset_type)
{
if ( ! $name || ! $asset_data || ! isset($asset_data[$asset_type])) {
return false;
}
Method _api_response
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _api_response($request)
{
if ( ! $this->ENABLE) {
return null;
}
Method drag_items
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function drag_items()
{
if (empty($_GET['id'])) {
return _e('No id!');
}
Method view
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$id = (int) $_GET['id'];
if ($id) {
$a = db()->from(self::table)->whereid($id)->get();
Method btn
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function btn($name, $link, $extra = [])
{
if (is_array($link)) {
$extra = $link;
$link = '';