Showing 3,246 of 4,217 total issues
Function _get_themes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _get_themes()
{
$themes = [];
foreach ((array) $this->_dir_array as $glob_name => $glob) {
foreach (glob($glob . '*/', GLOB_ONLYDIR) as $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 region_box
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function region_box($name = '', $desc = '', $extra = [], $replace = [], $form)
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$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
Function language_box
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function language_box($name = '', $desc = '', $extra = [], $replace = [], $form)
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$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
Function _spam_check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _spam_check($text)
{
preg_match_all(module('comments')->HTML_LINK_REGEX, $text, $result);
preg_match_all(module('comments')->BBCODE_LINK_REGEX, $text, $result2);
$count_links = count((array) $result[1]) + count((array) $result2[1]);
- 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 _escape_table_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _escape_table_name($name = '')
{
$name = trim($name);
if ( ! strlen($name)) {
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 create_index_line
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function create_index_line($name = '', $v = [], $params = [])
{
if (is_array($name)) {
$v = $name;
$name = $v['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
Function table_get_charset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function table_get_charset($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 send
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function send(array $params = [], &$error_message = '')
{
require_php_lib('sendinblue');
$error_message = 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 alter_database
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function alter_database($db_name, $extra = [], &$error = false)
{
if ( ! strlen($db_name)) {
$error = 'db_name is empty';
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 alter_database
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function alter_database($db_name, $extra = [], &$error = false)
{
if ( ! strlen($db_name)) {
$error = 'db_name is empty';
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 _get_num_comments
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _get_num_comments($params = [])
{
$OBJECT_NAME = ! empty($params['object_name']) ? $params['object_name'] : $_GET['object'];
$OBJECTS_IDS = ! empty($params['objects_ids']) ? $params['objects_ids'] : '';
if (empty($OBJECTS_IDS)) {
- 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_info
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function table_info($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_event
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function create_event($name, $event_shedule, $event_body, $extra = [], &$error = false)
{
if (strpos($name, '.') !== false) {
list($db_name, $name) = explode('.', trim($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
Function chunk
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function chunk($num = 100, $callback)
{
$sql = $this->sql();
if ( ! $sql) {
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 fix_sql_php
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function fix_sql_php(array $sql_php, $db)
{
$innodb_has_fulltext = $this->innodb_has_fulltext($db);
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 meta_tables
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function meta_tables($db_prefix = '')
{
$tables = $this->list_tables();
// Skip tables without prefix of current connection
if (strlen($db_prefix)) {
- 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 _save_query_revision
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _save_query_revision($method, $table, $params = [])
{
if (($allowed_methods = $this->QUERY_REVISIONS_METHODS)) {
if ( ! in_array($method, $allowed_methods)) {
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 _set_connect_params
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _set_connect_params($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 _execute_shutdown_queries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _execute_shutdown_queries()
{
if ( ! $this->USE_SHUTDOWN_QUERIES || isset($this->_shutdown_executed)) {
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 error_404
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function error_404($msg = '')
{
if ((MAIN_TYPE_ADMIN && is_logged_in()) || DEBUG_MODE) {
// Do not override status header for logged in admin, just display error inlined
! $msg && $msg = t('404 Not Found');
- 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"