Showing 355 of 3,032 total issues
Function displayFlash
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function displayFlash($url, $width = false, $height = false)
{
if (!$width || !$height) {
if (!$dimension = @\getimagesize($url)) {
return "<a href='{$url}' target='_blank'>{$url}</a>";
- 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 highlight
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function highlight($text, $needle)
{
// Select pattern to use
if ($this->simple) {
$pattern = '#(%s)#';
- 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
Consider simplifying this complex logical expression. Open
Open
if ($oldtitle[$i] !== $title[$i]
|| $oldweight[$i] !== $weight[$i]
|| $oldvisible[$i] !== $visible[$i]
|| $oldside[$i] !== $side[$i]
|| $oldbcachetime[$i] !== $bcachetime[$i]
Consider simplifying this complex logical expression. Open
Open
if (is_object($xoopsModule) && $xoopsModule->dirname() == $modversion['dirname'] && $xoopsModule->isactive()) {
$isAdmin = false;
if (is_object($GLOBALS['xoopsUser'])) {
$isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->getVar('mid'));
}
Function easeOutQuad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutQuad: function (x, t, b, c, d) {
Function easeInBounce
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInBounce: function (x, t, b, c, d) {
Function easeOutBounce
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutBounce: function (x, t, b, c, d) {
Function easeInOutBounce
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutBounce: function (x, t, b, c, d) {
Function easeInOutQuint
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutQuint: function (x, t, b, c, d) {
Function easeInSine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInSine: function (x, t, b, c, d) {
Function easeInOutCirc
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutCirc: function (x, t, b, c, d) {
Function easeOutExpo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutExpo: function (x, t, b, c, d) {
Function easeOutQuart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutQuart: function (x, t, b, c, d) {
Function easeInOutQuart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutQuart: function (x, t, b, c, d) {
Function easeInElastic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInElastic: function (x, t, b, c, d) {
Function easeInOutExpo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutExpo: function (x, t, b, c, d) {
Function easeOutElastic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutElastic: function (x, t, b, c, d) {
Function swing
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
swing: function (x, t, b, c, d) {
Function easeInQuart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInQuart: function (x, t, b, c, d) {
Function easeInQuad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInQuad: function (x, t, b, c, d) {