MPOS/php-mpos

View on GitHub

Showing 200 of 1,089 total issues

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

    function yy_r4_6($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 1107..1117

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_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_70($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 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_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

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_r2_72($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 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_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_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_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_r2_74($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 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

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

if (SECHASH_CHECK) {
  function fip($tr=0) { return md5(SECURITY.(time()-$tr).SECURITY); }
    define('SECHASH', fip());
  function cfip() { return (fip()==SECHASH||fip(1)==SECHASH||fip(2)==SECHASH) ? 1 : 0; }
} else {
Severity: Major
Found in upgrade/shared.inc.php and 3 other locations - About 3 hrs to fix
cronjobs/shared.inc.php on lines 28..34
public/index.php on lines 27..33
scripts/shared.inc.php on lines 33..39

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

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

if (SECHASH_CHECK) {
  function fip($tr=0) { return md5(SECURITY.(time()-$tr).SECURITY); }
  define('SECHASH', fip());
  function cfip() { return (fip()==SECHASH||fip(1)==SECHASH||fip(2)==SECHASH) ? 1 : 0; }
} else {
Severity: Major
Found in public/index.php and 3 other locations - About 3 hrs to fix
cronjobs/shared.inc.php on lines 28..34
scripts/shared.inc.php on lines 33..39
upgrade/shared.inc.php on lines 33..39

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

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

if (SECHASH_CHECK) {
  function fip($tr=0) { return md5(SECURITY.(time()-$tr).SECURITY); }
    define('SECHASH', fip());
  function cfip() { return (fip()==SECHASH||fip(1)==SECHASH||fip(2)==SECHASH) ? 1 : 0; }
} else {
Severity: Major
Found in scripts/shared.inc.php and 3 other locations - About 3 hrs to fix
cronjobs/shared.inc.php on lines 28..34
public/index.php on lines 27..33
upgrade/shared.inc.php on lines 33..39

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

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

if (SECHASH_CHECK) {
  function fip($tr=0) { return md5(SECURITY.(time()-$tr).SECURITY); }
  define('SECHASH', fip());
  function cfip() { return (fip()==SECHASH||fip(1)==SECHASH||fip(2)==SECHASH) ? 1 : 0; }
} else {
Severity: Major
Found in cronjobs/shared.inc.php and 3 other locations - About 3 hrs to fix
public/index.php on lines 27..33
scripts/shared.inc.php on lines 33..39
upgrade/shared.inc.php on lines 33..39

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

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

        } else {
            $this->mysqliW = new mysqli($main['host'],
                $main['user'], $main['pass'],
                $main['name'], $main['port']);
            if ($slave && is_array($slave) && isset($slave['enabled']) && $slave['enabled']
Severity: Major
Found in include/classes/mysqlims.class.php and 1 other location - About 3 hrs to fix
include/classes/mysqlims.class.php on lines 23..45

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

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

        if ($strict) {
            $this->mysqliW = new mysqli_strict($main['host'],
                $main['user'], $main['pass'],
                $main['name'], $main['port']);
            if ($slave && is_array($slave) && isset($slave['enabled']) && $slave['enabled']
Severity: Major
Found in include/classes/mysqlims.class.php and 1 other location - About 3 hrs to fix
include/classes/mysqlims.class.php on lines 34..45

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

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

    if (preg_match_all('#<(script|pre|textarea)[^>]*>.*?</\\1>#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
        foreach ($matches as $match) {
            $store[] = $match[0][0];
            $_length = strlen($match[0][0]);
            $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';
Severity: Major
Found in include/smarty/libs/plugins/outputfilter.trimwhitespace.php and 1 other location - About 3 hrs to fix
include/smarty/libs/plugins/outputfilter.trimwhitespace.php on lines 30..40

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

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

    if (preg_match_all('#<!--\[[^\]]+\]>.*?<!\[[^\]]+\]-->#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
        foreach ($matches as $match) {
            $store[] = $match[0][0];
            $_length = strlen($match[0][0]);
            $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';
Severity: Major
Found in include/smarty/libs/plugins/outputfilter.trimwhitespace.php and 1 other location - About 3 hrs to fix
include/smarty/libs/plugins/outputfilter.trimwhitespace.php on lines 48..58

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

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, "%sState push %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
        }
include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php on lines 63..73

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

Severity
Category
Status
Source
Language