Showing 355 of 3,032 total issues
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
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
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 easeInQuad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInQuad: function (x, t, b, c, d) {
Function easeOutQuint
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutQuint: 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 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 easeOutQuad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutQuad: 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 easeInBounce
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInBounce: 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 easeInQuart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeInQuart: 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 easeOutBounce
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutBounce: 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) {
Function easeOutQuart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
easeOutQuart: 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) {