Showing 3,246 of 4,217 total issues
Method api_payout
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
File yf_ck_file_browser.class.php
has 465 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_ck_file_browser
{
public $TOP_DIR = '/uploads/';
Method create_data
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create_data()
{
try {
// bear 1 is named Lawly. She is extremely dangerous. Especially when hungry.
$bear_lawly = bear::create([
Method _get_iso639_list
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _get_iso639_list()
{
// TODO: use db('languages') instead
return [
'aa' => ['Afar'],
Function translate_string
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
public function translate_string($in, $args = 0, $lang = '')
{
if ( ! $in) {
return $in;
}
- 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_methods
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
public function _get_methods($params = [])
{
$ONLY_PRIVATE_METHODS = [];
if (isset($params['private'])) {
$ONLY_PRIVATE_METHODS = $params['private'];
- 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 46 (exceeds 5 allowed). Consider refactoring. Open
public function connect($db_host = '', $db_user = '', $db_pswd = null, $db_name = null, $force = false, $params = [])
{
if (is_array($db_host)) {
$params = $db_host;
$db_host = '';
- 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_metatags
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
public function show_metatags($meta = [])
{
if (empty($meta)) {
$meta = $this->META_DEFAULT;
}
- 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 _process
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _process($params = [])
{
// THESE ARE REQUIRED!
$SOURCE_ARRAY = $params['source_array'];
$TABLE_NAME = $params['table_name'];
Method _request
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _request($url, $post = null, $options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// options
yf_db_utils_helper_create_table
has 50 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_db_utils_helper_create_table
{
protected $utils = null;
protected $db_name = '';
protected $table_name = '';
Method view
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
// check operation
$operation = $this->_operation();
// import options
Function _get_all_content_for_out
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
public function _get_all_content_for_out($out_type, $params = [])
{
$is_ajax = main()->is_ajax();
// Move down inlined content
$all_content = $this->get_content($out_type);
- 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
tpl_driver_yf_core_test
has 49 functions (exceeds 20 allowed). Consider refactoring. Open
class tpl_driver_yf_core_test extends tpl_abstract
{
public function return_true($out = '')
{
return $out ? (is_array($out) ? implode(',', $out) : $out) : 'true';
File yf_payment_api__provider_privat24.class.php
has 451 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
_class('payment_api__provider_remote');
class yf_payment_api__provider_privat24 extends yf_payment_api__provider_remote
Method _init
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _init()
{
$this->supported_conds = [
'in' => function ($a) {
return ' IN( ' . _es($a['value']) . ' )';
Function html_out
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function html_out($out_type, $content_type, $str, $params = [])
{
if ( ! $out_type || ! $content_type || ! strlen($str)) {
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 _cleanup_menu_items
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function _cleanup_menu_items($menu_items = [])
{
$center_block_id = _class('graphics')->_get_center_block_id();
$out = [];
- 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 show
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$object = &$this->object;
$action = &$this->action;
$filter_name = &$this->filter_name;
File yf_rewrite.class.php
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_rewrite
{
public $DEFAULT_HOST = '';