MPOS/php-mpos

View on GitHub

Showing 200 of 1,089 total issues

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

$aRegistrationInfo = array(
  '24hours' => $user->getCountFiltered('signup_timestamp', time() - 86400, 'i', '>='),
  '7days' => $user->getCountFiltered('signup_timestamp', (time() - (86400 * 7)), 'i', '>='),
  '1month' => $user->getCountFiltered('signup_timestamp', (time() - (86400 * 7 * 4)), 'i', '>='),
  '6month' => $user->getCountFiltered('signup_timestamp', (time() - (86400 * 7 * 4 * 6)), 'i', '>='),
Severity: Major
Found in include/pages/admin/dashboard.inc.php and 1 other location - About 4 hrs to fix
include/pages/admin/dashboard.inc.php on lines 53..59

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

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 ($config['sendmany']['enabled'] && $sendmanyAvailable && is_array($aSendMany)) {
    try {
      $rpc_txid = $bitcoin->sendmany('', $aSendMany);
    } catch (Exception $e) {
      $log->logError('E0078: RPC method sendmany did not return 200 OK: Address: ' . $aUserData['coin_address'] . ' ERROR: ' . $e->getMessage());
Severity: Major
Found in cronjobs/payouts.php and 1 other location - About 4 hrs to fix
cronjobs/payouts.php on lines 197..211

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

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 ($config['sendmany']['enabled'] && $sendmanyAvailable && is_array($aSendMany)) {
    try {
      $rpc_txid = $bitcoin->sendmany('', $aSendMany);
    } catch (Exception $e) {
      $log->logError('E0078: RPC method sendmany did not return 200 OK: Address: ' . $aUserData['coin_address'] . ' ERROR: ' . $e->getMessage());
Severity: Major
Found in cronjobs/payouts.php and 1 other location - About 4 hrs to fix
cronjobs/payouts.php on lines 114..128

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

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

$aLoginInfo = array(
  '24hours' => $user->getCountFiltered('last_login', time() - 86400, 'i', '>='),
  '7days' => $user->getCountFiltered('last_login', (time() - (86400 * 7)), 'i', '>='),
  '1month' => $user->getCountFiltered('last_login', (time() - (86400 * 7 * 4)), 'i', '>='),
  '6month' => $user->getCountFiltered('last_login', (time() - (86400 * 7 * 4 * 6)), 'i', '>='),
Severity: Major
Found in include/pages/admin/dashboard.inc.php and 1 other location - About 4 hrs to fix
include/pages/admin/dashboard.inc.php on lines 63..69

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

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

<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;

// Check if the API is activated
$api->isActive();
Severity: Major
Found in include/pages/api/getusersharerate.inc.php and 1 other location - About 4 hrs to fix
include/pages/api/getuserhashrate.inc.php on lines 1..24

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

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

<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;

// Check if the API is activated
$api->isActive();
Severity: Major
Found in include/pages/api/getuserhashrate.inc.php and 1 other location - About 4 hrs to fix
include/pages/api/getusersharerate.inc.php on lines 1..24

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  public function getCoinAddress($userID, $currency=NULL) {
    if ($currency === NULL) $currency = $this->config['currency'];
    $this->debug->append("STA " . __METHOD__, 4);
    $stmt = $this->mysqli->prepare("
      SELECT coin_address
Severity: Major
Found in include/classes/coin_address.class.php and 1 other location - About 4 hrs to fix
include/classes/coin_address.class.php on lines 45..60

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  public function getAPThreshold($userID, $currency=NULL) {
    if ($currency === NULL) $currency = $this->config['currency'];
    $this->debug->append("STA " . __METHOD__, 4);
    $stmt = $this->mysqli->prepare("
      SELECT ap_threshold
Severity: Major
Found in include/classes/coin_address.class.php and 1 other location - About 4 hrs to fix
include/classes/coin_address.class.php on lines 23..38

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

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

<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;

// ACL check
switch($setting->getValue('acl_moot_forum', 2)) {
Severity: Major
Found in include/pages/about/moot.inc.php and 1 other location - About 4 hrs to fix
include/pages/about/chat.inc.php on lines 1..20

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

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

<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;

// ACL check
switch($setting->getValue('acl_chat_page', 2)) {
Severity: Major
Found in include/pages/about/chat.inc.php and 1 other location - About 4 hrs to fix
include/pages/about/moot.inc.php on lines 1..20

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

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

  if (@$_REQUEST['next'] && !empty($_REQUEST['height'])) {
    $iHeight = @$roundstats->getNextBlock($_REQUEST['height']);
    if (!$iHeight) {
      $iBlock = $block->getLast();
      $iHeight = $iBlock['height'];
Severity: Major
Found in include/pages/statistics/blocks.inc.php and 2 other locations - About 4 hrs to fix
include/pages/admin/reports.inc.php on lines 34..47
include/pages/statistics/round.inc.php on lines 10..23

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

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

  if (@$_REQUEST['next'] && !empty($_REQUEST['height'])) {
    $iHeight = @$roundstats->getNextBlock($_REQUEST['height']);
    if (!$iHeight) {
      $iBlock = $block->getLast();
      $iHeight = $iBlock['height'];
Severity: Major
Found in include/pages/admin/reports.inc.php and 2 other locations - About 4 hrs to fix
include/pages/statistics/blocks.inc.php on lines 16..29
include/pages/statistics/round.inc.php on lines 10..23

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

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

  if (@$_REQUEST['next'] && !empty($_REQUEST['height'])) {
    $iHeight = @$roundstats->getNextBlock($_REQUEST['height']);
      if (!$iHeight) {
        $iBlock = $block->getLast();
        $iHeight = $iBlock['height']; 
Severity: Major
Found in include/pages/statistics/round.inc.php and 2 other locations - About 4 hrs to fix
include/pages/admin/reports.inc.php on lines 34..47
include/pages/statistics/blocks.inc.php on lines 16..29

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public function yy_find_reduce_action($stateno, $iLookAhead)
    {
        /* $stateno = $this->yystack[$this->yyidx]->stateno; */

        if (!isset(self::$yy_reduce_ofst[$stateno])) {
include/smarty/libs/sysplugins/smarty_internal_configfileparser.php on lines 567..588

Duplicated Code

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

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

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

Tuning

This issue has a mass of 157.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public function yy_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

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

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

Severity
Category
Status
Source
Language