Showing 3,246 of 4,217 total issues
File class_model_bears_test.Test.php
has 600 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once dirname(__DIR__) . '/db_real_abstract.php';
/**
File yf_manage_shop__product_revisions.class.php
has 596 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_manage_shop__product_revisions
{
public $temp_fields = [
Method parse
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parse($sql)
{
$parsed = $this->parser->parse($sql);
$table_name = $parsed['TABLE']['no_quotes']['parts'][0] ?: '';
yf_table2
has 69 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_table2
{
/* Example:
return table('SELECT * FROM '.db('admin'))
->text('login')
Function product_set_edit
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
public function product_set_edit()
{
$product_set_id = (int) $_GET['id'];
$a = db()->from('shop_product_sets')->whereid($product_set_id)->get();
- 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 _db_import
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
protected function _db_import($options, $test)
{
$_ = $options;
$id = $_['id'];
$fields = $_['fields'];
- 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 install.php
has 580 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// TODO: form validation
// TODO: add language selector $_POST['install_project_lang']
// TODO: webserver selection (write htaccess or not?)
Function _on_validate_ok
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public function _on_validate_ok($params = [], $form)
{
$p = $params ?: $_POST;
$f = $_FILES['file'];
- 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_graphics
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public function init_graphics()
{
$init_type = MAIN_TYPE;
// Do not remove this!
$this->_init_global_tags();
- 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 shop_products.sql_php.php
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
class_form_test
has 66 functions (exceeds 20 allowed). Consider refactoring. Open
class class_form_test extends yf\tests\wrapper
{
private static $_bak_settings = [];
private static $css = [];
private static $action = '';
File yf_ssh_files.class.php
has 566 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_ssh_files
{
yf_html
has 65 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_html
{
public $AUTO_ASSIGN_IDS = true;
public $BOXES_USE_STPL = false;
public $SELECT_BOX_DEF_OPT_TPL = '- %select% %name% -';
File forum_posts.data.php
has 561 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
1 => [
'id' => '1',
Function init
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
public function init()
{
// Chained 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
File sys_log_exec.sql_php.php
has 558 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
File yf_ssh.class.php
has 554 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* SSH Client (based on SSH2 PHP extension).
*
File yf_user_profile.class.php
has 553 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// User profile handling module
class yf_user_profile extends yf_module
{
Function _edit
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
public function _edit($params = [])
{
if (empty(main()->USER_ID) && MAIN_TYPE_USER) {
return _error_need_login();
}
- 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_i18n.class.php
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Locale handler.
*