librenms/librenms

View on GitHub
includes/discovery/sensors/dbm/fs-nmu.inc.php

Summary

Maintainability
F
3 days
Test Coverage

File fs-nmu.inc.php has 398 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * fs-nmu.inc.php
 *
 * -Description-
Severity: Minor
Found in includes/discovery/sensors/dbm/fs-nmu.inc.php - About 5 hrs to fix

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

    if (is_numeric($a2_tx)) {
        $descr = 'A2 Tx Power';
        $index = 'vSFPA2TxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($c2_rx)) {
        $descr = 'C2 Rx Power';
        $index = 'vSFPC2RxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($d2_rx)) {
        $descr = 'D2 Rx Power';
        $index = 'vSFPD2RxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437

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

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

    if (is_numeric($b1_rx)) {
        $descr = 'B1 Rx Power';
        $index = 'vSFPB1RxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($c2_tx)) {
        $descr = 'C2 Tx Power';
        $index = 'vSFPC2TxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($c1_tx)) {
        $descr = 'C1 Tx Power';
        $index = 'vSFPC1TxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($b2_rx)) {
        $descr = 'B2 Rx Power';
        $index = 'vSFPB2RxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($d1_rx)) {
        $descr = 'B1 Rx Power';
        $index = 'vSFPD1RxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($d2_tx)) {
        $descr = 'D2 Tx Power';
        $index = 'vSFPD2TxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($a1_rx)) {
        $descr = 'A1 Rx Power';
        $index = 'vSFPA1RxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($b2_tx)) {
        $descr = 'B2 Tx Power';
        $index = 'vSFPB2TxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($c1_rx)) {
        $descr = 'A1 Rx Power';
        $index = 'vSFPC1RxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($a1_tx)) {
        $descr = 'A1 Tx Power';
        $index = 'vSFPA1TxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 144..166
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

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

    if (is_numeric($a2_rx)) {
        $descr = 'A2 Rx Power';
        $index = 'vSFPA2RxPower.0';
        $divisor = '100';
        $multiplier = '1';
    Severity: Major
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 13 other locations - About 1 hr to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 69..91
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 94..116
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 119..141
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 192..214
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 217..239
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 242..264
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 267..289
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 292..314
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 317..339
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 342..364
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 390..412
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 415..437
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 440..462

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

    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 (is_numeric($b1_tx)) {
        $descr = 'B1 Tx Power';
        $index = 'vSFPB1TxPower.0';
        discover_sensor(
            $valid['sensor'],
    Severity: Minor
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 1 other location - About 40 mins to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 367..387

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

    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 (is_numeric($d1_tx)) {
        $descr = 'D1 Tx Power';
        $index = 'vSFPD1TxPower.0';
        discover_sensor(
            $valid['sensor'],
    Severity: Minor
    Found in includes/discovery/sensors/dbm/fs-nmu.inc.php and 1 other location - About 40 mins to fix
    includes/discovery/sensors/dbm/fs-nmu.inc.php on lines 169..189

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

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status