MPOS/php-mpos

View on GitHub

Showing 889 of 1,089 total issues

Function yy_get_expected_tokens has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yy_get_expected_tokens($token)
    {
        $state = $this->yystack[$this->yyidx]->stateno;
        $expected = self::$yyExpectedTokens[$state];
        if (in_array($token, self::$yyExpectedTokens[$state], true)) {
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfileparser.php - About 2 hrs to fix

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 yylex1 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex1()
    {
        $tokenMap = array (
              1 => 0,
              2 => 1,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_templatelexer.php - About 2 hrs to fix

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 yylex5 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex5()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_templatelexer.php - About 2 hrs to fix

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 yy_get_expected_tokens has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yy_get_expected_tokens($token)
    {
        $state = $this->yystack[$this->yyidx]->stateno;
        $expected = self::$yyExpectedTokens[$state];
        if (in_array($token, self::$yyExpectedTokens[$state], true)) {
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 2 hrs to fix

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 yylex2 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex2()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_templatelexer.php - About 2 hrs to fix

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 yylex4 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex4()
    {
        $tokenMap = array (
              1 => 1,
              3 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_templatelexer.php - About 2 hrs to fix

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 yylex3 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex3()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_templatelexer.php - About 2 hrs to fix

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 yylex6 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex6()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_templatelexer.php - About 2 hrs to fix

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 yylex5 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex5()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

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 yylex4 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex4()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

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 yylex2 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex2()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

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 yylex1 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex1()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

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 yylex6 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex6()
    {
        $tokenMap = array (
              1 => 0,
              2 => 0,
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

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 yylex3 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function yylex3()
    {
        $tokenMap = array (
              1 => 0,
            );
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

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 sendNotification has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

  public function sendNotification($account_id, $strType, $aMailData) {
    // Check if we notified for this event already
    if ( $this->isNotified($aMailData) ) {
      $this->setErrorMessage('A notification for this event has been sent already');
      return false;
Severity: Minor
Found in include/classes/notification.class.php - About 2 hrs to fix

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 _doTable_callback has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _doTable_callback($matches) {
        $head        = $matches[1];
        $underline    = $matches[2];
        $content    = $matches[3];

Severity: Minor
Found in include/lib/Michelf/Markdown.php - About 2 hrs to fix

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

Method yy_get_expected_tokens has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function yy_get_expected_tokens($token)
    {
        $state = $this->yystack[$this->yyidx]->stateno;
        $expected = self::$yyExpectedTokens[$state];
        if (in_array($token, self::$yyExpectedTokens[$state], true)) {
Severity: Major
Found in include/smarty/libs/sysplugins/smarty_internal_configfileparser.php - About 2 hrs to fix

    Method yy_get_expected_tokens has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function yy_get_expected_tokens($token)
        {
            $state = $this->yystack[$this->yyidx]->stateno;
            $expected = self::$yyExpectedTokens[$state];
            if (in_array($token, self::$yyExpectedTokens[$state], true)) {
    Severity: Major
    Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 2 hrs to fix

      Method getAttributes has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getAttributes($compiler, $attributes)
          {
              $_indexed_attr = array();
              // loop over attributes
              foreach ($attributes as $key => $mixed) {
      Severity: Major
      Found in include/smarty/libs/sysplugins/smarty_internal_compilebase.php - About 2 hrs to fix

        Method yylex4 has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function yylex4()
            {
                $tokenMap = array (
                      1 => 1,
                      3 => 0,
        Severity: Major
        Found in include/smarty/libs/sysplugins/smarty_internal_templatelexer.php - About 2 hrs to fix
          Severity
          Category
          Status
          Source
          Language