Showing 701 of 9,653 total issues
Method getDescendants
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$id = 0,
$includeSelf = false,
$childrenOnly = false,
$withRestrict = true,
$permType = 'public_access'
Method truncateHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(\XoopsDatabase $db, $table, $idField, $parentField, $sortField)
Function toggle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function toggle(id) {
if (document.getElementById) {
obj = document.getElementById(id);
}
if (document.all) {
- 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 admin_process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
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 admin_footer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function admin_footer()
{
global $pagenow;
// Only run in post/page creation and edit screens
- 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 parse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function parse($text)
{
# removes \r characters
$text = str_replace("\r\n", "\n", $text);
$text = str_replace("\r", "\n", $text);
- 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 form
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function form($instance)
{
$selected_slider = 0;
$title = '';
$sliders = 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 save
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function save($filename, $type = '', $quality = null)
{
$options = is_array($quality) ? $quality : [];
if (is_numeric($quality)) {
$options['quality'] = $quality;
- 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 checkImageLibrary
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function checkImageLibrary()
{
if (isset($this->options['imageLibrary']) && false === $this->options['imageLibrary']) {
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 getEditor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getEditor($helper = null, $options = null)
{
/** @var Helper $helper */
if (null === $options) {
$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 delExpect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function delExpect($error_code)
{
$deleted = false;
if ((is_array($error_code) && (0 != count($error_code)))) {
// $error_code is a non-empty array here; we walk through it trying
- 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 TrFctStart
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')
{
global $g_pcl_trace_level;
global $g_pcl_trace_mode;
global $g_pcl_trace_filename;
- 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 deleteById
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function deleteById($id, $force = false)
{
if (\is_array($this->keyName)) {
$clause = [];
for ($i = 0, $iMax = \count($this->keyName); $i < $iMax; ++$i) {
- 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 triggerEvent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function triggerEvent($event, &$param)
{
require XOOPS_ROOT_PATH . '/modules/extgallery/plugin/plugin.php';
if (is_iterable($extgalleryPlugin)) {
foreach ($extgalleryPlugin as $plugin => $status) {
- 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 TrFctEnd
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')
{
global $g_pcl_trace_level;
global $g_pcl_trace_mode;
global $g_pcl_trace_filename;
- 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
Avoid too many return
statements within this function. Open
return this;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this method. Open
return new MetaFlexSlider($id, $shortcode_settings);
Avoid too many return
statements within this function. Open
return false;