Showing 3,246 of 4,217 total issues
Function _searchd_running
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _searchd_running()
{
$pid_path = $this->LOG_PATH . 'searchd.pid';
if (file_exists($pid_path)) {
- 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 _format_date
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _format_date($input_date = '', $type = 'short')
{
if ( ! strlen($input_date)) {
return '';
}
- 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 _validate_rules_array_from_raw
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _validate_rules_array_from_raw($raw = '')
{
$rules = [];
// esxape '|' to '\|'
$delimeter = '|';
- 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_lib_path
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function _get_lib_path($name, $params = []) {
if (isset($this->php_libs[$name])) {
return $this->php_libs[$name];
}
if (!isset($this->_paths_cache)) {
- 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 _check_location
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _check_location($cur_country = '', $cur_region = '', $cur_city = '')
{
// TODO: rewrite me
if (FEATURED_COUNTRY_SELECT && ! empty($_POST['country']) && substr($_POST['country'], 0, 2) == 'f_') {
$_POST['country'] = substr($_POST['country'], 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
Function get_yf_console_commands
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function get_yf_console_commands()
{
$cmds = [];
$subfolder = 'commands/';
$prefix_project = 'console_';
- 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 html_table_to_array
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function html_table_to_array($html)
{
if ( ! preg_match_all('~<tr[^>]*>(.*?)</tr>~ims', $html, $m)) {
return [];
}
- 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 _fix_sql_php
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _fix_sql_php($sql_php)
{
$innodb_has_fulltext = self::_innodb_has_fulltext();
if ( ! $innodb_has_fulltext) {
// Remove fulltext indexes from db structure before creating 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 _fix_sql_php
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _fix_sql_php($sql_php)
{
$innodb_has_fulltext = self::_innodb_has_fulltext();
if ( ! $innodb_has_fulltext) {
// Remove fulltext indexes from db structure before creating 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
Method a
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function a()
{
$args = func_get_args();
$a = [];
// numerics params
Method load__cashex_xml
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load__cashex_xml($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// var
Method _form_options
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _form_options($options)
{
if ( ! $this->ENABLE) {
return null;
}
Method _api_response
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _api_response()
{
if ( ! $this->ENABLE) {
return null;
}
Method active
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function active($params = [])
{
if (is_string($params)) {
$params = [
'table' => $params,
Method _check_payout_operation
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _check_payout_operation($operation_id)
{
$payment_api = &$this->payment_api;
$operation = $payment_api->operation(['operation_id' => $operation_id]);
$address = $operation['options']['request'][0]['options']['address'] ?: false;
Method _save_login_in_session
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _save_login_in_session($user_info = [], $no_redirect_on_success = false)
{
if (empty($user_info['id'])) {
return js_redirect($this->URL_WRONG_LOGIN);
} elseif ($this->_is_user_inactive($user_info)) {
Method save
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function save(array $params = [])
{
// Try to get user error message source
$backtrace = debug_backtrace();
$cur_trace = $backtrace[2];
Method create_trigger
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create_trigger($name, $table, $trigger_time, $trigger_event, $trigger_body, $extra = [], &$error = false)
{
if (strpos($name, '.') !== false) {
list($db_name, $name) = explode('.', trim($name));
}
Method multi_get
has 47 lines of code (exceeds 25 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;
Method footer_link
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function footer_link($name, $link, $extra = [])
{
$item = [
'type' => __FUNCTION__,
'name' => $name,