modxcms/revolution

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

Summary

Maintainability
F
2 wks
Test Coverage

File smarty_internal_configfilelexer.php has 554 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Smarty Internal Plugin Configfilelexer
 *
 * This is the lexer to break the config file source into tokens
Severity: Major
Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 1 day to fix

    Smarty_Internal_Configfilelexer has 38 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Smarty_Internal_Configfilelexer
    {
        const START              = 1;
        const VALUE              = 2;
        const NAKED_STRING_VALUE = 3;
    Severity: Minor
    Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 5 hrs to fix

      Function yylex5 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public function yylex5()
          {
              if (!isset($this->yy_global_pattern5)) {
                  $this->yy_global_pattern5 = $this->replace("/\G(\\.)|\G(.*?(?=[\.=[\]\r\n]))/isS");
              }
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function yylex6 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public function yylex6()
          {
              if (!isset($this->yy_global_pattern6)) {
                  $this->yy_global_pattern6 = $this->replace("/\G(\"\"\"(?=[ \t\r]*[\n#;]))|\G([\S\s])/isS");
              }
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function yylex3 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public function yylex3()
          {
              if (!isset($this->yy_global_pattern3)) {
                  $this->yy_global_pattern3 = $this->replace("/\G([^\n]+?(?=[ \t\r]*\n))/isS");
              }
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function yylex1 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public function yylex1()
          {
              if (!isset($this->yy_global_pattern1)) {
                  $this->yy_global_pattern1 =
                      $this->replace("/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/isS");
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function yylex2 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public function yylex2()
          {
              if (!isset($this->yy_global_pattern2)) {
                  $this->yy_global_pattern2 =
                      $this->replace("/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS");
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function yylex4 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public function yylex4()
          {
              if (!isset($this->yy_global_pattern4)) {
                  $this->yy_global_pattern4 = $this->replace("/\G([ \t\r]+)|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS");
              }
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method yylex2 has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function yylex2()
          {
              if (!isset($this->yy_global_pattern2)) {
                  $this->yy_global_pattern2 =
                      $this->replace("/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS");
      Severity: Minor
      Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

        Method yylex1 has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function yylex1()
            {
                if (!isset($this->yy_global_pattern1)) {
                    $this->yy_global_pattern1 =
                        $this->replace("/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/isS");
        Severity: Minor
        Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

          Method yylex3 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function yylex3()
              {
                  if (!isset($this->yy_global_pattern3)) {
                      $this->yy_global_pattern3 = $this->replace("/\G([^\n]+?(?=[ \t\r]*\n))/isS");
                  }
          Severity: Minor
          Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

            Method yylex5 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function yylex5()
                {
                    if (!isset($this->yy_global_pattern5)) {
                        $this->yy_global_pattern5 = $this->replace("/\G(\\.)|\G(.*?(?=[\.=[\]\r\n]))/isS");
                    }
            Severity: Minor
            Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

              Method yylex6 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function yylex6()
                  {
                      if (!isset($this->yy_global_pattern6)) {
                          $this->yy_global_pattern6 = $this->replace("/\G(\"\"\"(?=[ \t\r]*[\n#;]))|\G([\S\s])/isS");
                      }
              Severity: Minor
              Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

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

                    public function yylex4()
                    {
                        if (!isset($this->yy_global_pattern4)) {
                            $this->yy_global_pattern4 = $this->replace("/\G([ \t\r]+)|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS");
                        }
                Severity: Minor
                Found in core/model/smarty/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

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

                      public function yylex1()
                      {
                          if (!isset($this->yy_global_pattern1)) {
                              $this->yy_global_pattern1 =
                                  $this->replace("/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/isS");
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 345..400
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 463..517
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 525..579
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 597..651
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 664..718
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 332..384
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 453..505
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 591..643
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 883..935
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 970..1022

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

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

                      public function yylex6()
                      {
                          if (!isset($this->yy_global_pattern6)) {
                              $this->yy_global_pattern6 = $this->replace("/\G(\"\"\"(?=[ \t\r]*[\n#;]))|\G([\S\s])/isS");
                          }
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 245..300
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 345..400
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 463..517
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 525..579
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 597..651
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 332..384
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 453..505
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 591..643
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 883..935
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 970..1022

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

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

                      public function yylex3()
                      {
                          if (!isset($this->yy_global_pattern3)) {
                              $this->yy_global_pattern3 = $this->replace("/\G([^\n]+?(?=[ \t\r]*\n))/isS");
                          }
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 245..300
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 345..400
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 525..579
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 597..651
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 664..718
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 332..384
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 453..505
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 591..643
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 883..935
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 970..1022

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

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

                      public function yylex4()
                      {
                          if (!isset($this->yy_global_pattern4)) {
                              $this->yy_global_pattern4 = $this->replace("/\G([ \t\r]+)|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS");
                          }
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 245..300
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 345..400
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 463..517
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 597..651
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 664..718
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 332..384
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 453..505
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 591..643
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 883..935
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 970..1022

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

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

                      public function yylex2()
                      {
                          if (!isset($this->yy_global_pattern2)) {
                              $this->yy_global_pattern2 =
                                  $this->replace("/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS");
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 245..300
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 463..517
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 525..579
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 597..651
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 664..718
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 332..384
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 453..505
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 591..643
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 883..935
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 970..1022

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

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

                      public function yylex5()
                      {
                          if (!isset($this->yy_global_pattern5)) {
                              $this->yy_global_pattern5 = $this->replace("/\G(\\.)|\G(.*?(?=[\.=[\]\r\n]))/isS");
                          }
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 245..300
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 345..400
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 463..517
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 525..579
                  core/model/smarty/sysplugins/smarty_internal_configfilelexer.php on lines 664..718
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 332..384
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 453..505
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 591..643
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 883..935
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 970..1022

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

                  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 yypushstate($state)
                      {
                          if ($this->yyTraceFILE) {
                              fprintf(
                                  $this->yyTraceFILE,
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 296..308

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

                  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 yypopstate()
                      {
                          if ($this->yyTraceFILE) {
                              fprintf(
                                  $this->yyTraceFILE,
                  core/model/smarty/sysplugins/smarty_internal_templatelexer.php on lines 310..321

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

                  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