Showing 3,246 of 4,217 total issues
Method _filter_sql_prepare
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _filter_sql_prepare($filter_data = [], $filter_params = [], $__sql = '', $table = null)
{
if ( ! $filter_data) {
return '';
}
File yf_image_manip.class.php
has 350 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Crop & rotate images.
*
Method _process_foreaches
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _process_foreaches($string = '', $replace = [], $stpl_name = '')
{
if (false === strpos($string, '{/foreach') || empty($string)) {
return $string;
}
Method alternate_remote_file_size
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function alternate_remote_file_size($url, $retry = 3)
{
$method = 'GET';
$time_start = microtime(true);
Method _db_import
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _db_import($options, $test)
{
$_ = $options;
$id = $_['id'];
$fields = $_['fields'];
yf_docs
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_docs
{
private $whats_new = [
'demo',
];
File yf_template_editor.class.php
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Templates handling class.
*
Method add
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function add($content, $asset_type = 'bundle', $content_type_hint = 'auto', $params = [])
{
if (DEBUG_MODE) {
$trace = main()->trace_string();
}
Method mail
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function mail()
{
$mail_tpl = [
'payin_success' => [
'type' => 'payin',
Method _show_menu
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _show_menu($params = [])
{
$return_array = isset($params['return_array']) ? $params['return_array'] : false;
$force_stpl_name = isset($params['force_stpl_name']) ? $params['force_stpl_name'] : false;
$menu_name = $params['name'];
Method init_graphics
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init_graphics()
{
$init_type = MAIN_TYPE;
// Do not remove this!
$this->_init_global_tags();
Method _order_pay_authorize_net
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _order_pay_authorize_net($params = [])
{
$order_info = $params['order_info'];
$params = $params['params'];
Function operation
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function operation($options = null)
{
$_ = &$options;
$is_no_count = &$_['no_count'];
$is_sql = &$_['sql'];
- 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_users_daily_payments
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function _get_users_daily_payments($user_ids = [], $type = 'sum')
{
if ( ! $user_ids) {
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 _pcntl_dispatch
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function _pcntl_dispatch($options = null)
{
$result = false;
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
- 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 from
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function from()
{
$sql = '';
$tables = func_get_args();
if ( ! count((array) $tables)) {
- 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 table_get_columns
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function table_get_columns($table, $extra = [], &$error = false)
{
if (is_array($table)) {
$extra = (array) $extra + $table;
$table = '';
- 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 create_table
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function create_table($table, $extra = [], &$error = false)
{
// Example callable: create_table($name, function($t) { $t->int('id', 10); });
if (is_callable($extra)) {
if (strpos($table, '.') !== 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 multi_get
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function multi_get($names = [], $force_ttl = 0, $params = [])
{
$do_real_work = true;
if ( ! $this->_driver_ok || $this->NO_CACHE) {
$do_real_work = 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 connect
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function connect($server_info = [])
{
if ( ! $this->_INIT_OK || ! $server_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"