MPOS/php-mpos

View on GitHub
include/smarty/libs/sysplugins/smarty_internal_templateparser.php

Summary

Maintainability
F
4 mos
Test Coverage

File smarty_internal_templateparser.php has 2007 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
* Smarty Internal Plugin Templateparser
*
* This is the template parser.
Severity: Major
Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 5 days to fix

    Smarty_Internal_Templateparser has 167 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Smarty_Internal_Templateparser#line 80 "smarty_internal_templateparser.php"
    {
    #line 15 "smarty_internal_templateparser.y"
    
        const Err1 = "Security error: Call to private object member not allowed";
    Severity: Major
    Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 3 days 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) {
      Severity: Minor
      Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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

      Function yy_r154 has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          function yy_r154(){
          if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {
              if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'array') === 0 || is_callable($this->yystack[$this->yyidx + -3]->minor)) {
                  $func_name = strtolower($this->yystack[$this->yyidx + -3]->minor);
                  if ($func_name == 'isset') {
      Severity: Minor
      Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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 81 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) {
      Severity: Major
      Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 3 hrs to fix

        Function yy_is_expected_token has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

            public function yy_is_expected_token($token)
            {
                if ($token === 0) {
                    return true; // 0 is not part of this
                }
        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

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

            public function yy_is_expected_token($token)
            {
                if ($token === 0) {
                    return true; // 0 is not part of this
                }
        Severity: Major
        Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 2 hrs to fix

          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

          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

            Function yy_r9 has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

                function yy_r9(){
                if ($this->php_handling == Smarty::PHP_PASSTHRU) {
                    $this->_retvalue = new _smarty_text($this, '<<?php ?>%');
                } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
                    $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
            Severity: Minor
            Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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

            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;  */
            Severity: Minor
            Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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_reduce has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function yy_reduce($yyruleno)
                {
                    $yymsp = $this->yystack[$this->yyidx];
                    if ($this->yyTraceFILE && $yyruleno >= 0
                          && $yyruleno < count(self::$yyRuleName)) {
            Severity: Minor
            Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 1 hr to fix

              Method yy_r154 has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function yy_r154(){
                  if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {
                      if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'array') === 0 || is_callable($this->yystack[$this->yyidx + -3]->minor)) {
                          $func_name = strtolower($this->yystack[$this->yyidx + -3]->minor);
                          if ($func_name == 'isset') {
              Severity: Minor
              Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 1 hr to fix

                Method yy_shift has 30 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 include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 1 hr to fix

                  Function yy_r10 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function yy_r10(){
                      if ($this->php_handling == Smarty::PHP_PASSTHRU) {
                          $this->_retvalue = new _smarty_text($this, '%<?php ?>>');
                      } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
                          $this->_retvalue = new _smarty_text($this, htmlspecialchars('%>', ENT_QUOTES));
                  Severity: Minor
                  Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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_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;  */
                  Severity: Minor
                  Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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)
                        {
                            $yymsp = $this->yystack[$this->yyidx];
                            if ($this->yyTraceFILE && $yyruleno >= 0
                                  && $yyruleno < count(self::$yyRuleName)) {
                    Severity: Minor
                    Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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 include/smarty/libs/sysplugins/smarty_internal_templateparser.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 offsetSet has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function offsetSet($offset, $value)
                        {
                            if ($offset === null) {
                                if (isset($value[0])) {
                                    $x = ($value instanceof TP_yyToken) ?
                    Severity: Minor
                    Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 45 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 true;
                    Severity: Major
                    Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

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

                        Avoid too many return statements within this method.
                        Open

                                return array_unique($expected);
                        Severity: Major
                        Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                                  return true;
                          Severity: Major
                          Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    return $expected;
                            Severity: Major
                            Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

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

                                Avoid too many return statements within this method.
                                Open

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

                                  Avoid too many return statements within this method.
                                  Open

                                          return true;
                                  Severity: Major
                                  Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                            return false;
                                    Severity: Major
                                    Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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])) {
                                      Severity: Minor
                                      Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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

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

                                          function yy_r119(){
                                          if (!$this->security || isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor]) || $this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx + -2]->minor, $this->compiler)) {
                                              if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) {
                                                  $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor;
                                              } else {
                                      Severity: Minor
                                      Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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

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

                                          function yy_r7(){
                                          if ($this->php_handling == Smarty::PHP_PASSTHRU) {
                                              $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
                                          } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
                                              $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
                                      Severity: Minor
                                      Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.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

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

                                          static public $yy_lookahead = array(
                                       /*     0 */     1,    4,    5,    6,    7,    8,    9,   10,   11,   12,
                                       /*    10 */    13,   14,   15,   30,   66,   18,   18,    2,   20,   36,
                                       /*    20 */    23,   24,   94,   95,   96,   39,   29,   28,   30,   30,
                                       /*    30 */    33,   60,   35,   60,   36,   36,   65,   18,   65,   20,
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 228..470

                                      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 7228.

                                      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

                                      static public $yy_action = array(
                                       /*     0 */   219,  309,  305,  301,  302,  303,  304,  310,  311,  317,
                                       /*    10 */   318,  319,  201,   30,  273,    9,   33,  238,  280,   15,
                                       /*    20 */     5,  108,  235,  234,  220,    7,  126,   42,   30,   30,
                                       /*    30 */   259,  211,  256,  495,   15,   15,   10,   33,  495,  280,
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 471..713

                                      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 7228.

                                      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 doParse($yymajor, $yytokenvalue)
                                          {
                                              $yyerrorhit = 0;   /* True if yymajor has invoked an error */
                                      
                                              if ($this->yyidx === null || $this->yyidx < 0) {
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 838..926

                                      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 735.

                                      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)
                                          {
                                              $state = $this->yystack[$this->yyidx]->stateno;
                                              $expected = self::$yyExpectedTokens[$state];
                                              if (in_array($token, self::$yyExpectedTokens[$state], true)) {
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 388..456

                                      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 554.

                                      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)
                                          {
                                              if ($token === 0) {
                                                  return true; // 0 is not part of this
                                              }
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 458..529

                                      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 534.

                                      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)
                                          {
                                              $yymsp = $this->yystack[$this->yyidx];
                                              if ($this->yyTraceFILE && $yyruleno >= 0
                                                    && $yyruleno < count(self::$yyRuleName)) {
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 762..801

                                      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 391.

                                      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

                                      class TP_yyToken implements ArrayAccess
                                      {
                                          public $string = '';
                                          public $metadata = array();
                                      
                                      
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 12..75

                                      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 338.

                                      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--;
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 590..624

                                      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 291.

                                      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;  */
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 531..565

                                      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])) {
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 567..588

                                      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

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

                                          public function yy_pop_parser_stack()
                                          {
                                              if (!count($this->yystack)) {
                                                  return;
                                              }
                                      include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 360..376

                                      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 125.

                                      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

                                          $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + 0]->minor,array(array('start'=>$this->yystack[$this->yyidx + -5]->minor),array('to'=>$this->yystack[$this->yyidx + -3]->minor),array('step'=>$this->yystack[$this->yyidx + -1]->minor))),0);
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 2458..2458

                                      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 103.

                                      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

                                          $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + 0]->minor,array(array('from'=>$this->yystack[$this->yyidx + -7]->minor),array('item'=>$this->yystack[$this->yyidx + -1]->minor),array('key'=>$this->yystack[$this->yyidx + -4]->minor))));
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 2443..2443

                                      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 103.

                                      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

                                          function yy_r42(){
                                          $tag = trim(substr($this->yystack[$this->yyidx + -1]->minor,$this->lex->ldel_length)); 
                                          $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + 0]->minor));
                                          }
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 2421..2424

                                      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 102.

                                      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

                                          function yy_r44(){
                                          $tag = trim(substr($this->yystack[$this->yyidx + -1]->minor,$this->lex->ldel_length));
                                          $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + 0]->minor));
                                          }
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 2409..2412

                                      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 102.

                                      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

                                              /* 53 */ array(1, 28, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ),
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 824..824

                                      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 94.

                                      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

                                              /* 54 */ array(1, 3, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ),
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 823..823

                                      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 94.

                                      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 5 locations. Consider refactoring.
                                      Open

                                              /* 58 */ array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ),
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 825..825
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 826..826
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 827..827
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 829..829

                                      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

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

                                              /* 55 */ array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ),
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 826..826
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 827..827
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 828..828
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 829..829

                                      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

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

                                              /* 57 */ array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ),
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 825..825
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 826..826
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 828..828
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 829..829

                                      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

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

                                              /* 59 */ array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ),
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 825..825
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 826..826
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 827..827
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 828..828

                                      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

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

                                              /* 56 */ array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ),
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 825..825
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 827..827
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 828..828
                                      include/smarty/libs/sysplugins/smarty_internal_templateparser.php on lines 829..829

                                      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