MPOS/php-mpos

View on GitHub

Showing 1,089 of 1,089 total issues

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

    function yy_r4_4($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 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_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

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

Method compile has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function compile($args, $compiler, $parameter)
    {
        // check and get attributes
        $_attr = $this->getAttributes($compiler, $args);
        $output = $parameter['value'];

    Method smarty_function_html_options has 91 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function smarty_function_html_options($params, $template)
    {
        require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
    
        $name = null;
    Severity: Major
    Found in include/smarty/libs/plugins/function.html_options.php - About 3 hrs to fix

      File AbstractSmtpTransport.php has 318 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      /*
       * This file is part of SwiftMailer.
       * (c) 2004-2009 Chris Corbyn

        Function smarty_mb_str_replace has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

            function smarty_mb_str_replace($search, $replace, $subject, &$count=0)
            {
                if (!is_array($search) && is_array($replace)) {
                    return false;
                }
        Severity: Minor
        Found in include/smarty/libs/plugins/shared.mb_str_replace.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 compile has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

            public function compile($args, $compiler)
            {
                if (!($compiler->smarty instanceof SmartyBC)) {
                    throw new SmartyException("{include_php} is deprecated, use SmartyBC class to enable");
                }

        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 getTransactions has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

          public function getTransactions($start=0, $filter=NULL, $limit=30, $account_id=NULL) {
            $this->debug->append("STA " . __METHOD__, 4);
            $sql = "
              SELECT
                t.id AS id,
        Severity: Minor
        Found in include/classes/transaction.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

        Function getTopContributors has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

          public function getTopContributors($type='shares', $limit=15) {
            $this->debug->append("STA " . __METHOD__, 4);
            switch ($type) {
            case 'shares':
              if ($this->getGetCache() && $data = $this->memcache->get(__FUNCTION__ . $type . $limit)) return $data;
        Severity: Minor
        Found in include/classes/statistics.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

        Function filter has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

            public function filter($buffer, $_minReplaces = -1)
            {
                if ($this->_treeMaxLen == 0) {
                    return $buffer;
                }

        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 smarty_function_html_radios has 89 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function smarty_function_html_radios($params, $template)
        {
            require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
        
            $name = 'radio';
        Severity: Major
        Found in include/smarty/libs/plugins/function.html_radios.php - About 3 hrs to fix

          Swift_Signers_DKIMSigner has 29 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Swift_Signers_DKIMSigner implements Swift_Signers_HeaderSigner
          {
              /**
               * PrivateKey
               *
          Severity: Minor
          Found in include/lib/swiftmailer/classes/Swift/Signers/DKIMSigner.php - About 3 hrs to fix

            Swift_Transport_Esmtp_Auth_NTLMAuthenticator has 29 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Swift_Transport_Esmtp_Auth_NTLMAuthenticator implements Swift_Transport_Esmtp_Authenticator
            {
                const NTLMSIG = "NTLMSSP\x00";
                const DESCONST = "KGS!@#$%";
            
            

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

              Severity
              Category
              Status
              Source
              Language