Showing 355 of 3,032 total issues
Function convertForJapanese
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function convertForJapanese($str)
{
// no action, if not flag
if (!\defined('_PUBLISHER_FLAG_JP_CONVERT')) {
return $str;
- 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 easeInOutCirc
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutCirc: function (x, t, b, c, d) {
Function easeOutCubic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutCubic: function (x, t, b, c, d) {
Function easeOutCirc
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutCirc: 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 easeInExpo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInExpo: 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 easeInCirc
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInCirc: function (x, t, b, c, d) {
Function easeInOutElastic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutElastic: function (x, t, b, c, d) {
Function easeInOutQuad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInOutQuad: 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 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 easeInQuint
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInQuint: 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 easeInCubic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInCubic: function (x, t, b, c, d) {