modxcms/revolution

View on GitHub
core/model/smarty/sysplugins/smarty_internal_configfileparser.php

Summary

Maintainability
F
3 wks
Test Coverage

File smarty_internal_configfileparser.php has 816 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

class TPC_yyStackEntry
{
    public $stateno;       /* The state-number */
Severity: Major
Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 1 day to fix

    Function doParse has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

        public function doParse($yymajor, $yytokenvalue)
        {
            $yyerrorhit = 0;   /* True if yymajor has invoked an error */
            if ($this->yyidx === null || $this->yyidx < 0) {
                $this->yyidx = 0;
    Severity: Minor
    Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 7 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

    Smarty_Internal_Configfileparser has 40 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Smarty_Internal_Configfileparser
    {
        // line 25 "../smarty/lexer/smarty_internal_configfileparser.y"
        const TPC_OPENB                = 1;
        const TPC_SECTION              = 2;
    Severity: Minor
    Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 5 hrs to fix

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

          public function yy_get_expected_tokens($token)
          {
              static $res3 = array();
              static $res4 = array();
              $state = $this->yystack[ $this->yyidx ]->stateno;
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 4 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_is_expected_token has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          public function yy_is_expected_token($token)
          {
              static $res = array();
              static $res2 = array();
              if ($token === 0) {
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 4 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 doParse has 92 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function doParse($yymajor, $yytokenvalue)
          {
              $yyerrorhit = 0;   /* True if yymajor has invoked an error */
              if ($this->yyidx === null || $this->yyidx < 0) {
                  $this->yyidx = 0;
      Severity: Major
      Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 3 hrs to fix

        Method yy_is_expected_token has 76 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function yy_is_expected_token($token)
            {
                static $res = array();
                static $res2 = array();
                if ($token === 0) {
        Severity: Major
        Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 3 hrs to fix

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

              public function yy_get_expected_tokens($token)
              {
                  static $res3 = array();
                  static $res4 = array();
                  $state = $this->yystack[ $this->yyidx ]->stateno;
          Severity: Major
          Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 2 hrs to fix

            Method yy_reduce has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function yy_reduce($yyruleno)
                {
                    if ($this->yyTraceFILE && $yyruleno >= 0
                        && $yyruleno < count(self::$yyRuleName)) {
                        fprintf(
            Severity: Minor
            Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 1 hr to fix

              Function yy_find_shift_action has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function yy_find_shift_action($iLookAhead)
                  {
                      $stateno = $this->yystack[ $this->yyidx ]->stateno;
                      /* if ($this->yyidx < 0) return self::YY_NO_ACTION;  */
                      if (!isset(self::$yy_shift_ofst[ $stateno ])) {
              Severity: Minor
              Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 1 hr 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_shift has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function yy_shift($yyNewState, $yyMajor, $yypMinor)
                  {
                      $this->yyidx++;
                      if ($this->yyidx >= self::YYSTACKDEPTH) {
                          $this->yyidx--;
              Severity: Minor
              Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 1 hr to fix

                Method yy_find_shift_action has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function yy_find_shift_action($iLookAhead)
                    {
                        $stateno = $this->yystack[ $this->yyidx ]->stateno;
                        /* if ($this->yyidx < 0) return self::YY_NO_ACTION;  */
                        if (!isset(self::$yy_shift_ofst[ $stateno ])) {
                Severity: Minor
                Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 1 hr to fix

                  Function yy_reduce has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function yy_reduce($yyruleno)
                      {
                          if ($this->yyTraceFILE && $yyruleno >= 0
                              && $yyruleno < count(self::$yyRuleName)) {
                              fprintf(
                  Severity: Minor
                  Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 55 mins 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_shift has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function yy_shift($yyNewState, $yyMajor, $yypMinor)
                      {
                          $this->yyidx++;
                          if ($this->yyidx >= self::YYSTACKDEPTH) {
                              $this->yyidx--;
                  Severity: Minor
                  Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 55 mins 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 parse_single_quoted_string has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private static function parse_single_quoted_string($qstr)
                      {
                          $escaped_string = substr($qstr, 1, strlen($qstr) - 2); //remove outer quotes
                          $ss = preg_split('/(\\\\.)/', $escaped_string, -1, PREG_SPLIT_DELIM_CAPTURE);
                          $str = '';
                  Severity: Minor
                  Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 35 mins 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

                  Avoid too many return statements within this method.
                  Open

                                          return array_unique($expected);
                  Severity: Major
                  Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                            return $expected;
                    Severity: Major
                    Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return array_unique($expected);
                      Severity: Major
                      Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return self::$yy_action[ $i ];
                        Severity: Major
                        Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                                          return array_unique($expected);
                          Severity: Major
                          Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    return false;
                            Severity: Major
                            Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      return true;
                              Severity: Major
                              Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                            return true;
                                Severity: Major
                                Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                          return true;
                                  Severity: Major
                                  Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                return self::$yy_default[ $stateno ];
                                    Severity: Major
                                    Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                                  return true;
                                      Severity: Major
                                      Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                                    return true;
                                        Severity: Major
                                        Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                      return self::$yy_action[ $i ];
                                          Severity: Major
                                          Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 30 mins to fix

                                            Function yy_find_reduce_action has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                                public function yy_find_reduce_action($stateno, $iLookAhead)
                                                {
                                                    /* $stateno = $this->yystack[$this->yyidx]->stateno; */
                                                    if (!isset(self::$yy_reduce_ofst[ $stateno ])) {
                                                        return self::$yy_default[ $stateno ];
                                            Severity: Minor
                                            Found in core/model/smarty/sysplugins/smarty_internal_configfileparser.php - About 25 mins 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

                                            Identical blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public function doParse($yymajor, $yytokenvalue)
                                                {
                                                    $yyerrorhit = 0;   /* True if yymajor has invoked an error */
                                                    if ($this->yyidx === null || $this->yyidx < 0) {
                                                        $this->yyidx = 0;
                                            core/model/smarty/sysplugins/smarty_internal_templateparser.php on lines 3540..3625

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 731.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Identical blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public function yy_get_expected_tokens($token)
                                                {
                                                    static $res3 = array();
                                                    static $res4 = array();
                                                    $state = $this->yystack[ $this->yyidx ]->stateno;
                                            core/model/smarty/sysplugins/smarty_internal_templateparser.php on lines 1882..1964

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 687.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public function yy_is_expected_token($token)
                                                {
                                                    static $res = array();
                                                    static $res2 = array();
                                                    if ($token === 0) {
                                            core/model/smarty/sysplugins/smarty_internal_templateparser.php on lines 1966..2052

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 666.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Identical blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public function yy_reduce($yyruleno)
                                                {
                                                    if ($this->yyTraceFILE && $yyruleno >= 0
                                                        && $yyruleno < count(self::$yyRuleName)) {
                                                        fprintf(
                                            core/model/smarty/sysplugins/smarty_internal_templateparser.php on lines 3469..3506

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 372.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Identical blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public function yy_find_shift_action($iLookAhead)
                                                {
                                                    $stateno = $this->yystack[ $this->yyidx ]->stateno;
                                                    /* if ($this->yyidx < 0) return self::YY_NO_ACTION;  */
                                                    if (!isset(self::$yy_shift_ofst[ $stateno ])) {
                                            core/model/smarty/sysplugins/smarty_internal_templateparser.php on lines 2054..2085

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 287.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public function yy_shift($yyNewState, $yyMajor, $yypMinor)
                                                {
                                                    $this->yyidx++;
                                                    if ($this->yyidx >= self::YYSTACKDEPTH) {
                                                        $this->yyidx--;
                                            core/model/smarty/sysplugins/smarty_internal_templateparser.php on lines 2110..2141

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 287.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Identical blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public function yy_find_reduce_action($stateno, $iLookAhead)
                                                {
                                                    /* $stateno = $this->yystack[$this->yyidx]->stateno; */
                                                    if (!isset(self::$yy_reduce_ofst[ $stateno ])) {
                                                        return self::$yy_default[ $stateno ];
                                            core/model/smarty/sysplugins/smarty_internal_templateparser.php on lines 2087..2107

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 157.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public static $yy_lookahead     = array(
                                                    7, 8, 9, 10, 11, 12, 5, 23, 15, 16,
                                                    20, 21, 2, 23, 4, 17, 18, 14, 17, 18,
                                                    13, 14, 25, 26, 15, 2, 17, 3, 3, 17,
                                                    25, 25, 6, 1, 23, 27, 22, 24,
                                            core/model/smarty/sysplugins/smarty_internal_configfileparser.php on lines 61..66

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 121.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public static $yy_action        = array(
                                                    32, 31, 30, 29, 35, 13, 19, 3, 24, 26,
                                                    59, 9, 14, 1, 16, 25, 11, 28, 25, 11,
                                                    17, 27, 34, 20, 18, 15, 23, 5, 6, 22,
                                                    10, 8, 4, 12, 2, 33, 7, 21,
                                            core/model/smarty/sysplugins/smarty_internal_configfileparser.php on lines 68..73

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 121.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Identical blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public function yy_pop_parser_stack()
                                                {
                                                    if (empty($this->yystack)) {
                                                        return;
                                                    }
                                            core/model/smarty/sysplugins/smarty_internal_templateparser.php on lines 1855..1870

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 118.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                            Open

                                                public $yyTokenName = array(
                                                    '$', 'OPENB', 'SECTION', 'CLOSEB',
                                                    'DOT', 'ID', 'EQUAL', 'FLOAT',
                                                    'INT', 'BOOL', 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING',
                                                    'TRIPPLE_QUOTES', 'TRIPPLE_TEXT', 'TRIPPLE_QUOTES_END', 'NAKED_STRING',
                                            core/model/modx/modcategory.class.php on lines 29..31

                                            Duplicated Code

                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                            Tuning

                                            This issue has a mass of 91.

                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                            Refactorings

                                            Further Reading

                                            There are no issues that match your filters.

                                            Category
                                            Status