Showing 4,217 of 4,217 total issues
Method test_check_box
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_check_box()
{
$html = html();
$def_class = $html->CLASS_LABEL_CHECKBOX . ' ' . $html->CLASS_LABEL_CHECKBOX_INLINE;
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function _get_latest_warnings()
{
if ( ! $this->sphinx_connection) {
$this->_connect();
}
- 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 115.
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 index_info($table, $index_name, &$error = false)
{
if (is_array($table)) {
$extra = (array) $extra + $table;
$table = '';
- 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 115.
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 foreign_key_info($table, $index_name, &$error = false)
{
if (is_array($table)) {
$extra = (array) $extra + $table;
$table = '';
- 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 115.
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 _get_latest_meta()
{
if ( ! $this->sphinx_connection) {
$this->_connect();
}
- 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 115.
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
Function cancel
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
cancel: function( options ) {
var $this = this;
$scope.block_wait = true;
$scope.is_submitted = true;
$scope.status = false;
Method _sign_liqpay
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _sign_liqpay()
{
$form = '';
$api = _class('payment_api__provider_liqpay');
// test signature
Method confirmation_ok
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function confirmation_ok($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// operation
Method api_token_revoke
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_token_revoke($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Method _api_response
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _api_response($options)
{
$operation_id = isset($_GET['operation_id']) ? (int) ($_GET['operation_id']) : '';
$this->payment_api->dump(['name' => ucfirst($this->PROVIDER_NAME), 'operation_id' => $operation_id]);
// import options
Method delete
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function delete($params = [])
{
if (is_string($params)) {
$params = [
'table' => $params,
Method _purse_by_currency
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _purse_by_currency($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Method _init
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _init()
{
require_php_lib('twig');
// path
Method from
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function from()
{
$sql = '';
$tables = func_get_args();
if ( ! count((array) $tables)) {
Method whereid
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function whereid()
{
$id = func_get_args();
$pk = '';
if (count((array) $id) > 1) {
Method create_trigger
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create_trigger($name, $table, $trigger_time, $trigger_event, $trigger_body, $extra = [], &$error = false)
{
if (strpos($name, '.') !== false) {
list($db_name, $name) = explode('.', trim($name));
}
Method multi_set
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function multi_set($data = [], $ttl = 0)
{
$do_real_work = true;
if ( ! $this->_driver_ok || $this->NO_CACHE) {
$do_real_work = false;
Method _drag_tpl_items
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _drag_tpl_items(&$items)
{
$body = [];
$form = _class('form2');
Method category_revision_checkout
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function category_revision_checkout()
{
$type = 'category';
$object = 'category_editor';
$action = 'edit_item';
Method _check_words_length
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _check_words_length($text, $length = 0, $do_encode_email = false)
{
if (empty($length)) {
$length = 60;
if (SITE_MAX_WORD_LENGTH != 'SITE_MAX_WORD_LENGTH' && SITE_MAX_WORD_LENGTH != '') {