Showing 3,246 of 4,217 total issues
yf_manage_payout
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_manage_payout
{
public $IS_PAYOUT_INTERKASSA = null;
public $payment_api = null;
File yf_manage_shop_products.class.php
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_manage_shop_products
{
Method api_payout
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Function ajax_city
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function ajax_city()
{
main()->NO_GRAPHICS = true;
// Check input
if (isset($_REQUEST['country'])) {
- 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 _external_response
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function _external_response()
{
$operation_id = $_GET['operation_id'];
$secret = $_GET['secret'];
$payment_api = $this->payment_api;
- 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 _fix_data_safe
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function _fix_data_safe($table, $data = [], $extra = [])
{
if ( ! $this->FIX_DATA_SAFE) {
return $data;
}
- 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 _render_as_html
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function _render_as_html(&$params, &$a, &$to_hide)
{
$body = '';
$header_links = [];
if (MAIN_TYPE_ADMIN && ! $params['no_pages'] && ! $params['no_total'] && $a['total']) {
- 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 delete
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function delete()
{
$i = preg_replace('~[^a-z0-9_]+~ims', '', trim($_GET['i']));
if ( ! $i || ! isset($this->instances[$i])) {
return js_redirect('/@object');
- 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
Method api_payout
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
File yf_geo_content.class.php
has 404 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// Content display by geo location (ads, pages, etc)
class yf_geo_content
{
Method _add
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _add($params = [])
{
if (empty(main()->USER_ID) && MAIN_TYPE_USER && ! $params['allow_guests_posts']) {
return '';
}
Method _multi_request
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _multi_request($urls, $options = [], $max_threads = 0, &$requests_info = [])
{
if ( ! $max_threads) {
$max_threads = $this->CURL_DEF_MAX_THREADS;
}
File yf_shop.class.php
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Shop module.
*/
Function _security_settings
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function _security_settings()
{
asset('bfh-select');
$user_id = main()->USER_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 init
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function init()
{
// Chanined config rule
if ($this->BLOCK_FAILED_LOGINS) {
$this->LOG_FAILED_LOGINS = true;
- 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 _init
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function _init()
{
$this->supported_conds = [
'in' => function ($a) {
return ' IN( ' . _es($a['value']) . ' )';
- 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_remote_page
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function get_remote_page($url = '', $cache_ttl = -1, $url_options = [], &$requests_info = [])
{
if (empty($url)) {
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 scan_dir
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function scan_dir($server_info = [], $start_dir = '', $pattern_include = '', $pattern_exclude = '', $level = 0, $single_file = '')
{
if (is_array($start_dir)) {
$_merged_contents = [];
foreach ((array) $start_dir as $_start_dir) {
- 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
File sample_core_api.class.php
has 399 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class sample_core_api
{
public function _init()
File yf_comments.class.php
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Comments handler.
*