Showing 3,246 of 4,217 total issues
File yf_redirect.class.php
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Redirects handler.
*
Method _api_response
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _api_response()
{
if ( ! $this->ENABLE) {
return null;
}
Method ajax
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ajax($force_id = false)
{
$id = (int) ($force_id ?: $_GET['id']);
$admin = from(self::table)->whereid($id)->get();
if ( ! $id || ! $admin) {
Method render
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($params = [])
{
if (DEBUG_MODE) {
$ts = microtime(true);
}
Method _upload_item__import_action_test
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _upload_item__import_action_test($options)
{
$_ = $options;
$fields = $_['fields'];
$keys = $_['keys'];
Method query
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function query($sql, $need_meta = false)
{
if (empty($sql)) {
return false;
}
yf_menus_editor
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_menus_editor
{
/** @var string Path to icons */
public $ICONS_PATH = 'uploads/icons/';
yf_tpl_driver_yf
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_tpl_driver_yf
{
/** @var array @conf_skip For "_process_ifs" */
public $_cond_operators = [
'eq' => '==',
Method multi_check_box
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function multi_check_box($name, $values = [], $selected = [], $horizontal = true, $type = 2, $add_str = '', $translate = 0, $name_as_array = false)
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = $extra['name'];
Method transfer
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function transfer($options = null)
{
$_ = &$options;
$is_transaction = isset( $_['is_transaction'] ) ? $_['is_transaction'] : true;
// check: from, to
Method _security_settings
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _security_settings()
{
asset('bfh-select');
$user_id = main()->USER_ID;
Method http_request
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function http_request($url, $headers = [], $method = 'GET', $data = null, $retry = 3)
{
$result = new stdClass();
// Parse the URL, and make sure we can handle the schema.
$uri = parse_url($url);
Method show_html
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show_html($page = 'form', $vars = [], $errors = [])
{
if (php_sapi_name() == 'cli' || ! $_SERVER['PHP_SELF']) {
return print '__CONSOLE_INSTALL__' . PHP_EOL;
}
File yf_auth_admin.class.php
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Special methods for admin authentification.
*
Method _init
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _init()
{
// class
$this->payment_api = _class('payment_api');
$this->manage_payment_lib = module('manage_payment_lib');
Function _paths
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function _paths() {
$paths = [
'.',
'plugins',
];
- 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 query_fetch_all
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function query_fetch_all($sql, $key_name = null, $use_cache = true)
{
if ( ! strlen($sql)) {
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 _render_thead
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function _render_thead(&$params, &$a, &$to_hide)
{
$data = &$a['data'];
$thead_attrs = '';
if (isset($params['thead'])) {
- 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_table_contents
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function _render_table_contents($data, $params = [], $to_hide = [])
{
$tbody_attrs = '';
if (isset($params['tbody'])) {
$tbody_attrs = is_array($params['tbody']) ? _attrs($params['tbody'], ['class', 'id']) : ' ' . $params['tbody'];
- 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_table_contents_rotated
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function _render_table_contents_rotated($data = [], $params, $to_hide = [])
{
$tbody_attrs = '';
if (isset($params['tbody'])) {
$tbody_attrs = is_array($params['tbody']) ? _attrs($params['tbody'], ['class', 'id']) : ' ' . $params['tbody'];
- 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"