MPOS/php-mpos

View on GitHub

Showing 1,089 of 1,089 total issues

Function loadPlugin has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    public function loadPlugin($plugin_name, $check = true)
    {
        // if function or class exists, exit silently (already loaded)
        if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) {
            return true;
Severity: Minor
Found in include/smarty/libs/Smarty.class.php - About 3 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

Mobile_Detect has 31 functions (exceeds 20 allowed). Consider refactoring.
Open

class Mobile_Detect
{
    /**
     * Mobile detection type.
     *
Severity: Minor
Found in include/lib/Mobile_Detect.php - About 3 hrs to fix

    Swift_Transport_AbstractSmtpTransport has 31 functions (exceeds 20 allowed). Consider refactoring.
    Open

    abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport
    {
        /** Input-Output buffer for sending/receiving SMTP commands and responses */
        protected $_buffer;
    
    

      File scrypt.php has 325 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
      * Zend Framework (http://framework.zend.com/)
      *
      * @link http://github.com/zendframework/zf2 for the canonical source repository
      Severity: Minor
      Found in include/lib/scrypt.php - About 3 hrs to fix

        Method smarty_function_html_table has 94 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function smarty_function_html_table($params, $template)
        {
            $table_attr = 'border="1"';
            $tr_attr = '';
            $th_attr = '';
        Severity: Major
        Found in include/smarty/libs/plugins/function.html_table.php - About 3 hrs to fix

          Function smarty_modifier_debug_print_var has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          function smarty_modifier_debug_print_var ($var, $depth = 0, $length = 40)
          {
              $_replace = array("\n" => '<i>\n</i>',
                  "\r" => '<i>\r</i>',
                  "\t" => '<i>\t</i>'
          Severity: Minor
          Found in include/smarty/libs/plugins/modifier.debug_print_var.php - About 3 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 __call has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

              public function __call($name, $args)
              {
                  static $_prefixes = array('set' => true, 'get' => true);
                  static $_resolved_property_name = array();
                  static $_resolved_property_source = array();
          Severity: Minor
          Found in include/smarty/libs/sysplugins/smarty_internal_templatebase.php - About 3 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 getPrice has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

            public function getPrice() {
              $aData = $this->getApi($this->config['price']['url'], $this->config['price']['target']);
              $strBase = $this->config['currency'];
              $strQuote = $this->config['price']['currency'];
              // Check the API type for configured URL
          Severity: Minor
          Found in include/classes/tools.class.php - About 3 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

          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_templateparser.php on lines 1673..1694

          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_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

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

              function yy_r1_9($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
               $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r2_75($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
              $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r4_3($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
               $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r4_5($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
              $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r2_73($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
               $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r1_12($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
              $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r1_11($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
               $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r1_10($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
               $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r1_13($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
              $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1074..1084
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

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

              function yy_r4_1($yy_subpatterns)
              {
          
            if ($this->smarty->auto_literal && ($this->mbstring_overload ? (mb_strpos(" \n\t\r",mb_substr($this->value,$this->ldel_length,1,'latin1'),0,'latin1') !== false) : (strpos(" \n\t\r",substr($this->value,$this->ldel_length,1)) !== false))) {
               $this->token = Smarty_Internal_Templateparser::TP_TEXT;
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 258..268
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 269..279
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 280..290
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 291..301
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 302..312
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 313..323
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 811..821
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 822..832
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 833..843
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 844..854
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 855..865
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1085..1095
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1096..1106
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1107..1117
          include/smarty/libs/sysplugins/smarty_internal_templatelexer.php on lines 1118..1128

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

          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

          Severity
          Category
          Status
          Source
          Language