Showing 3,246 of 4,217 total issues
File sys_log_csrf_errors.sql_php.php
has 639 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
File yf_utils.class.php
has 639 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_utils
{
/**
yf_db_utils_driver
has 76 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class yf_db_utils_driver
{
/**
* Catch missing method call.
* @param mixed $name
Function _add
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
public function _add($params = [])
{
if (empty(main()->USER_ID) && MAIN_TYPE_USER && ! $params['allow_guests_posts']) {
return '';
}
- 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 _show
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
public function _show($params = [])
{
// Set cookie
if (empty($_COOKIE['advertise']) && $_GET['ads_places'] == 1) {
- 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 yf_payment_api__provider_bitaps.class.php
has 632 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
_class('payment_api__provider_remote');
class yf_payment_api__provider_bitaps extends yf_payment_api__provider_remote
File tpl_driver_yf_core_test.Test.php
has 632 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/tpl__setup.php';
class tpl_driver_yf_core_test extends tpl_abstract
class_validate_test
has 75 functions (exceeds 20 allowed). Consider refactoring. Open
class class_validate_test extends yf\tests\wrapper
{
public static function tearDownAfterClass() : void
{
common()->USER_ERRORS = [];
File yf_admin_methods.class.php
has 629 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Common admin methods hidden by simple api.
*
Function strip_tags_smart
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
function strip_tags_smart(
/*string*/ $s,
array $allowable_tags = null,
/*boolean*/ $is_format_spaces = true,
array $pair_tags = ['script', 'style', 'map', 'iframe', 'frameset', 'object', 'applet', 'comment', 'button'],
- 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 yf_dir.class.php
has 625 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Filesystem utils.
*
Function _multi_request
has a Cognitive Complexity of 69 (exceeds 5 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;
}
- 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 yf_manage_payment.class.php
has 617 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_manage_payment
{
public $payment_api = null;
File yf_common_funcs.php
has 612 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/yf_aliases.php';
require_once __DIR__ . '/yf_is_funcs.php';
require_once __DIR__ . '/yf_array_funcs.php';
Method render
has 267 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($extra = [], $replace = [])
{
if (isset($this->_rendered)) {
return $this->_rendered;
}
File class_db_real_query_builder_mysql_test.Test.php
has 608 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/db_real_abstract.php';
/**
Function _render_get_data
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
public function _render_get_data(&$params)
{
$default_per_page = MAIN_TYPE_USER ? conf('user_per_page') : conf('admin_per_page');
if ($params['rotate_table']) {
$default_per_page = 10;
- 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 balance-recharge.js
has 606 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function () { 'use strict';
var __NS__ = 'payment.balance.recharge';
__ANGULAR_MODULES__.push( __NS__ );
File yf_core_api.class.php
has 604 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Core API.
*/
Function _validate_rules_cleanup
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
public function _validate_rules_cleanup($validate_rules = [])
{
// Trim names with spaces
foreach ((array) $validate_rules as $name => $raw) {
$trimmed = trim($name);
- 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"