Showing 236 of 310 total issues
Consider simplifying this complex logical expression. Open
if ((0 == $options[5]) && (1 == $options[4])
&& (($options[6] > 0 && $options[6] == $story->storyid())
|| (0 == $options[6] && 0 == $key))) {
$spotlight = [];
$visible = true;
Method news_search
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function news_search($queryarray, $andor, $limit, $offset, $userid)
Method truncateHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
Method getChildTreeArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getChildTreeArray($sel_id = 0, $order = '', $perms = '', $parray = [], $r_prefix = '')
Method addSelectOptions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function addSelectOptions($element, $fieldName, $key, $prefix_orig, $prefix_curr = ''): void
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($total_items, $items_perpage, $current_start, $start_name = 'start', $extra_arg = '')
Method getStoriesByIds
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$ids,
$checkRight = true,
$asobject = true,
$order = 'published',
$onlyOnline = true
Method getArchive
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$publish_start,
$publish_end,
$checkRight = false,
$asobject = true,
$order = 'published'
Method getAllExpired
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function getAllExpired($limit = 0, $start = 0, $topic = 0, $ihome = 0, $asobject = true)
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 createUploadName
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function createUploadName($folder, $filename, $trimname = false)
{
$workingfolder = $folder;
if ('/' !== \xoops_substr($workingfolder, mb_strlen($workingfolder) - 1, 1)) {
$workingfolder .= '/';
- 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 makeSelBoxOptions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function makeSelBoxOptions($fieldName, $selected, $key, &$ret, $prefix_orig, $prefix_curr = ''): void
{
if ($key > 0) {
$value = $this->tree[$key]['obj']->getVar($this->myId);
$ret .= '<option value="' . $value . '"';
- 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 news_resizePicture
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function news_resizePicture(
$src_path,
$dst_path,
$param_width,
$param_height,
- 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 news_notify_iteminfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function news_notify_iteminfo($category, $item_id)
{
if ('global' === $category) {
$item['name'] = '';
$item['url'] = '';
- 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 delete
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function delete($keyword): void
{
if (\is_array($keyword)) {
foreach ($keyword as $onekeyword) {
if (isset($this->keywords[$onekeyword])) {
- 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 getTopicsList
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getTopicsList($frontpage = false, $perms = false)
{
$ret = [];
$sql = 'SELECT topic_id, topic_pid, topic_title, topic_color FROM ' . $this->table . ' WHERE 1 ';
if ($frontpage) {
- 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 hometext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function hometext($format = 'Show')
{
$hometext = '';
$myts = \MyTextSanitizer::getInstance();
$html = $smiley = $xcodes = 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 bodytext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function bodytext($format = 'Show')
{
$myts = \MyTextSanitizer::getInstance();
$html = 1;
$smiley = 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 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 hometext
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function hometext($format = 'Show')
{
$myts = MyTextSanitizer::getInstance();
$html = 1;
$smiley = 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"