Showing 3,246 of 4,217 total issues
Method connect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function connect($db_host = '', $db_user = '', $db_pswd = null, $db_name = null, $force = false, $params = [])
Function _init
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function _init()
{
// Perform auto-connection to db if needed
if (($this->AUTO_CONNECT || MAIN_TYPE == 'admin') && ! $this->NO_AUTO_CONNECT) {
$this->connect();
- 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
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function get($name, $force_ttl = 0, array $params = [])
{
if ($name === false || $name === null || ! is_string($name)) {
return null;
}
- 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 crop_image
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function crop_image($source_file_path, $dest_file_path, $LIMIT_X, $LIMIT_Y, $pos_left, $pos_top)
Function _render_totals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function _render_totals(&$params, &$a, &$to_hide)
{
$data = &$a['data'];
$total_fields = $params['totals'];
- 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 set
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function set($name, $data, $ttl = 0)
{
if ($name === false || $name === null) {
return null;
}
- 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 _curl_use_http_queue_item
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function _curl_use_http_queue_item($id, $details)
{
$url = $details['url'];
$url_options = $details['options'];
- 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_user_info
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function get_user_info()
{
if (DEBUG_MODE && $_GET['oauth_clean']) {
$this->_storage_clean();
}
- 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 make_thumb
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function make_thumb($source_file_path = '', $dest_file_path = '', $LIMIT_X = -1, $LIMIT_Y = -1, $watermark_path = '', $ext = '')
Function go
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function go($url, &$chars, $get_var_name = 'id', $q_var = 'id')
{
$nUrl = $url . '&' . $get_var_name . '=';
$chars = strtolower(substr($chars . '11', 0, 2));
$sel_style = ' style="background-color:#ccc;"';
- 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 _utf8_strip_non_ascii
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function _utf8_strip_non_ascii($str)
{
ob_start();
while (preg_match('/^([\x00-\x7F]+)|([^\x00-\x7F]+)/S', $str, $matches)) {
if ( ! isset($matches[2])) {
- 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 go
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function go($source_file_path = '', $dest_file_path = '', $LIMIT_X = -1, $LIMIT_Y = -1, $watermark_path = '', $ext = '')
Function _get_ip
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function _get_ip($check_type = 'force')
{
$cache_name = '_CURRENT_' . $check_type . 'IP';
if (isset($this->CACHE[$cache_name])) {
return $this->CACHE[$cache_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"
Further reading
Method _netpbm_cut
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function _netpbm_cut($source_file_path, $dest_file_path, $LIMIT_Width, $LIMIT_Height, $pos_left, $pos_top)
Method _use_gd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function _use_gd($source_file_path = '', $dest_file_path = '', $LIMIT_X = -1, $LIMIT_Y = -1, $watermark_path = '', $output_type = '')
Function get_spiders_ips_sql
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function get_spiders_ips_sql($field_name = 'ip')
{
if ( ! $field_name) {
$field_name = 'ip';
}
- 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 crop
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function crop($source_file_path, $dest_file_path, $LIMIT_X, $LIMIT_Y, $pos_left, $pos_top)
Method _gd_crop
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function _gd_crop($source_path, $dest_file_path, $crop_width, $crop_height, $pos_left, $pos_top)
Method _imagick_crop
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function _imagick_crop($source_file_path, $dest_file_path, $LIMIT_width, $LIMIT_height, $pos_left, $pos_top)
Function _get_conf
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function _get_conf($key = null, array $options = [])
{
// lower
$k = strtolower($key);
if ( ! isset($this->config_default[$k])) {
- 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"