Showing 3,246 of 4,217 total issues
Method send
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function send(array $params = [], &$error_message = '')
{
$CRLF = "\r\n";
$TAB = "\t";
Method get_access_token
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_access_token()
{
$access_token = $this->_storage_get('access_token');
if ($access_token) {
return $access_token;
Method _currency_convert
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _currency_convert($number = 0, $c_from = '', $c_to = '')
{
if ( ! $number || ! $c_from || ! $c_to) {
return $number;
}
Method _is_spider
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _is_spider($ip = '', $ua = '')
{
$CHECK_IP = false;
$CHECK_UA = false;
if ($ip && preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $ip)) {
Method coupon_edit
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function coupon_edit()
{
$_GET['id'] = (int) ($_GET['id']);
if (empty($_GET['id'])) {
return _e('Empty ID!');
Method express
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function express()
{
$date = date('Y-m-d');
$orders_info = db()->query_fetch_all('SELECT * FROM ' . db('shop_orders') . " WHERE delivery_time LIKE '" . $date . "%' AND status = 1");
if ( ! empty($orders_info)) {
Method _do_check_data_is_valid
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _do_check_data_is_valid($rules = [], &$data)
{
$validate_ok = true;
$_all = '__all__';
if (isset($rules[$_all])) {
Method test_validate_multi_select
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_validate_multi_select()
{
$_SERVER['REQUEST_METHOD'] = 'POST';
$params = ['do_not_remove_errors' => 1];
Method test_sql_to_php_db_installer
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_sql_to_php_db_installer()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
File yf_captcha.class.php
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Class to handle CAPTCHA images (to prevent auto-registering, flooding etc).
*
Function _sub_add
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function _sub_add($info, $asset_type, $_params = [])
{
if ( ! $info) {
return false;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function var_edit
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function var_edit()
{
$a = $this->_get_var_info($_GET['id']);
if ( ! $a) {
return _e('Wrong var id');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function cancel
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function cancel($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// var
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function mail
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function mail()
{
$mail_tpl = [
'payin_success' => [
'type' => 'payin',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_payout_operation
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function _check_payout_operation($operation_id)
{
$payment_api = &$this->payment_api;
$operation = $payment_api->operation(['operation_id' => $operation_id]);
$address = $operation['options']['request'][0]['options']['address'] ?: false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function api_payout
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function api_payout
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_data
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function get_data()
{
$relation = $this->_relation;
$model = $this->_model;
$db = $model->_db;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_submodules
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function get_submodules($section = 'all')
{
$data = [];
foreach ($this->section_paths as $_section => $folder) {
if ($section != 'all' && $section != $_section) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function options_to_str
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function options_to_str(array $options, $is_request = true, $level = 1)
{
if ($level > $this->options_level_max) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"