librenms/librenms

View on GitHub
LibreNMS/OS/Timos.php

Summary

Maintainability
F
1 wk
Test Coverage

File Timos.php has 756 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Timos.php
 *
 * -Description-
Severity: Major
Found in LibreNMS/OS/Timos.php - About 1 day to fix

    The class Timos has 23 public methods. Consider refactoring Timos to keep number of public methods under 10.
    Open

    class Timos extends OS implements MplsDiscovery, MplsPolling, WirelessPowerDiscovery, WirelessSnrDiscovery, WirelessRsrqDiscovery, WirelessRssiDiscovery, WirelessRsrpDiscovery, WirelessChannelDiscovery
    {
        public function discoverOS(Device $device): void
        {
            parent::discoverOS($device); // yaml
    Severity: Minor
    Found in LibreNMS/OS/Timos.php by phpmd

    TooManyPublicMethods

    Since: 0.1

    A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

    By default it ignores methods starting with 'get' or 'set'.

    Example

    Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

    The class Timos has an overall complexity of 85 which is very high. The configured complexity threshold is 50.
    Open

    class Timos extends OS implements MplsDiscovery, MplsPolling, WirelessPowerDiscovery, WirelessSnrDiscovery, WirelessRsrqDiscovery, WirelessRssiDiscovery, WirelessRsrpDiscovery, WirelessChannelDiscovery
    {
        public function discoverOS(Device $device): void
        {
            parent::discoverOS($device); // yaml
    Severity: Minor
    Found in LibreNMS/OS/Timos.php by phpmd

    Timos has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Timos extends OS implements MplsDiscovery, MplsPolling, WirelessPowerDiscovery, WirelessSnrDiscovery, WirelessRsrqDiscovery, WirelessRssiDiscovery, WirelessRsrpDiscovery, WirelessChannelDiscovery
    {
        public function discoverOS(Device $device): void
        {
            parent::discoverOS($device); // yaml
    Severity: Minor
    Found in LibreNMS/OS/Timos.php - About 2 hrs to fix

      Method pollMplsSaps has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function pollMplsSaps($svcs)
          {
              $mplsSapCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sapBaseInfoTable', [], 'TIMETRA-SAP-MIB', 'nokia', '-OQUst');
              $mplsSapTrafficCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sapBaseStatsTable', [], 'TIMETRA-SAP-MIB', 'nokia', '-OQUst');
      
      
      Severity: Major
      Found in LibreNMS/OS/Timos.php - About 2 hrs to fix

        Method pollMplsTunnelArHops has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function pollMplsTunnelArHops($paths)
            {
                $mplsTunnelArHopCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'mplsTunnelARHopTable', [], 'MPLS-TE-MIB', 'nokia', '-OQUsbt');
                $mplsTunnelArHopCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsTunnelARHopTable', $mplsTunnelArHopCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUsb');
        
        
        Severity: Minor
        Found in LibreNMS/OS/Timos.php - About 1 hr to fix

          Method discoverMplsTunnelArHops has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function discoverMplsTunnelArHops($paths)
              {
                  $mplsTunnelArHopCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'mplsTunnelARHopTable', [], 'MPLS-TE-MIB', 'nokia', '-OQUsbt');
                  $mplsTunnelArHopCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsTunnelARHopTable', $mplsTunnelArHopCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUsb');
          
          
          Severity: Minor
          Found in LibreNMS/OS/Timos.php - About 1 hr to fix

            Method pollMplsLsps has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function pollMplsLsps()
                {
                    $mplsLspCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspTable', [], 'TIMETRA-MPLS-MIB', 'nokia');
                    if (! empty($mplsLspCache)) {
                        $mplsLspCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspLastChange', $mplsLspCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUst');
            Severity: Minor
            Found in LibreNMS/OS/Timos.php - About 1 hr to fix

              Method discoverMplsServices has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function discoverMplsServices()
                  {
                      $mplsSvcCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'svcBaseInfoTable', [], 'TIMETRA-SERV-MIB', 'nokia', '-OQUst');
                      $mplsSvcCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'svcTlsInfoTable', $mplsSvcCache, 'TIMETRA-SERV-MIB', 'nokia', '-OQUst');
              
              
              Severity: Minor
              Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                Method discoverMplsSaps has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function discoverMplsSaps($svcs)
                    {
                        $mplsSapCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sapBaseInfoTable', [], 'TIMETRA-SAP-MIB', 'nokia', '-OQUst');
                        $mplsSapTrafficCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sapBaseStatsTable', [], 'TIMETRA-SAP-MIB', 'nokia', '-OQUst');
                
                
                Severity: Minor
                Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                  Method pollMplsPaths has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function pollMplsPaths($lsps)
                      {
                          $mplsPathCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspPathTable', [], 'TIMETRA-MPLS-MIB', 'nokia');
                          if (! empty($mplsPathCache)) {
                              $mplsPathCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspPathLastChange', $mplsPathCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUst');
                  Severity: Minor
                  Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                    Method pollMplsServices has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function pollMplsServices()
                        {
                            $mplsSvcCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'svcBaseInfoTable', [], 'TIMETRA-SERV-MIB', 'nokia', '-OQUst');
                            $mplsSvcCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'svcTlsInfoTable', $mplsSvcCache, 'TIMETRA-SERV-MIB', 'nokia', '-OQUst');
                    
                    
                    Severity: Minor
                    Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                      Method discoverWirelesspower has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function discoverWirelesspower()
                          {
                              $name = $this->getCacheByIndex('aluMwRadioName', 'ALU-MICROWAVE-MIB');
                              $rsl = snmpwalk_cache_oid($this->getDeviceArray(), 'aluMwRadioLocalRxMainPower', [], 'ALU-MICROWAVE-MIB');
                              $tx = snmpwalk_cache_oid($this->getDeviceArray(), 'aluMwRadioLocalTxPower', [], 'ALU-MICROWAVE-MIB');
                      Severity: Minor
                      Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                        Method discoverMplsSdpBinds has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function discoverMplsSdpBinds($sdps, $svcs)
                            {
                                $mplsBindCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sdpBindTable', [], 'TIMETRA-SDP-MIB', 'nokia', '-OQUsbt');
                                $mplsBindCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sdpBindBaseStatsTable', $mplsBindCache, 'TIMETRA-SDP-MIB', 'nokia', '-OQUsb');
                        
                        
                        Severity: Minor
                        Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                          Method pollMplsSdpBinds has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function pollMplsSdpBinds($sdps, $svcs)
                              {
                                  $mplsBindCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sdpBindTable', [], 'TIMETRA-SDP-MIB', 'nokia', '-OQUsbt');
                                  $mplsBindCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sdpBindBaseStatsTable', $mplsBindCache, 'TIMETRA-SDP-MIB', 'nokia', '-OQUsb');
                          
                          
                          Severity: Minor
                          Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                            Method discoverMplsLsps has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function discoverMplsLsps()
                                {
                                    $mplsLspCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspTable', [], 'TIMETRA-MPLS-MIB', 'nokia');
                                    if (! empty($mplsLspCache)) {
                                        $mplsLspCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspLastChange', $mplsLspCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUst');
                            Severity: Minor
                            Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                              Method discoverMplsPaths has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function discoverMplsPaths($lsps)
                                  {
                                      $mplsPathCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspPathTable', [], 'TIMETRA-MPLS-MIB', 'nokia');
                                      if (! empty($mplsPathCache)) {
                                          $mplsPathCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspPathLastChange', $mplsPathCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUst');
                              Severity: Minor
                              Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                                Method discoverMplsSdps has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function discoverMplsSdps()
                                    {
                                        $mplsSdpCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sdpInfoTable', [], 'TIMETRA-SDP-MIB', 'nokia', '-OQUst');
                                
                                        $sdps = new Collection();
                                Severity: Minor
                                Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                                  Method pollMplsSdps has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function pollMplsSdps()
                                      {
                                          $mplsSdpCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sdpInfoTable', [], 'TIMETRA-SDP-MIB', 'nokia', '-OQUst');
                                  
                                          $sdps = new Collection();
                                  Severity: Minor
                                  Found in LibreNMS/OS/Timos.php - About 1 hr to fix

                                    Function pollMplsTunnelArHops has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function pollMplsTunnelArHops($paths)
                                        {
                                            $mplsTunnelArHopCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'mplsTunnelARHopTable', [], 'MPLS-TE-MIB', 'nokia', '-OQUsbt');
                                            $mplsTunnelArHopCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsTunnelARHopTable', $mplsTunnelArHopCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUsb');
                                    
                                    
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php - About 45 mins 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 pollMplsSaps has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function pollMplsSaps($svcs)
                                        {
                                            $mplsSapCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sapBaseInfoTable', [], 'TIMETRA-SAP-MIB', 'nokia', '-OQUst');
                                            $mplsSapTrafficCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'sapBaseStatsTable', [], 'TIMETRA-SAP-MIB', 'nokia', '-OQUst');
                                    
                                    
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php - About 35 mins 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 discoverMplsLsps has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function discoverMplsLsps()
                                        {
                                            $mplsLspCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspTable', [], 'TIMETRA-MPLS-MIB', 'nokia');
                                            if (! empty($mplsLspCache)) {
                                                $mplsLspCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspLastChange', $mplsLspCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUst');
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php - About 25 mins 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 pollMplsLsps has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function pollMplsLsps()
                                        {
                                            $mplsLspCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspTable', [], 'TIMETRA-MPLS-MIB', 'nokia');
                                            if (! empty($mplsLspCache)) {
                                                $mplsLspCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'vRtrMplsLspLastChange', $mplsLspCache, 'TIMETRA-MPLS-MIB', 'nokia', '-OQUst');
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php - About 25 mins 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

                                    The class Timos has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
                                    Open

                                    class Timos extends OS implements MplsDiscovery, MplsPolling, WirelessPowerDiscovery, WirelessSnrDiscovery, WirelessRsrqDiscovery, WirelessRssiDiscovery, WirelessRsrpDiscovery, WirelessChannelDiscovery
                                    {
                                        public function discoverOS(Device $device): void
                                        {
                                            parent::discoverOS($device); // yaml
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    CouplingBetweenObjects

                                    Since: 1.1.0

                                    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

                                    Example

                                    class Foo {
                                        /**
                                         * @var \foo\bar\X
                                         */
                                        private $x = null;
                                    
                                        /**
                                         * @var \foo\bar\Y
                                         */
                                        private $y = null;
                                    
                                        /**
                                         * @var \foo\bar\Z
                                         */
                                        private $z = null;
                                    
                                        public function setFoo(\Foo $foo) {}
                                        public function setBar(\Bar $bar) {}
                                        public function setBaz(\Baz $baz) {}
                                    
                                        /**
                                         * @return \SplObjectStorage
                                         * @throws \OutOfRangeException
                                         * @throws \InvalidArgumentException
                                         * @throws \ErrorException
                                         */
                                        public function process(\Iterator $it) {}
                                    
                                        // ...
                                    }

                                    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

                                    The method discoverMplsSdps uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                    Open

                                                } else {
                                                    //Fixme implement ipv6 conversion
                                                    $ip = $value['sdpFarEndInetAddress'] ?? null;
                                                }
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    ElseExpression

                                    Since: 1.4.0

                                    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($flag) {
                                                // one branch
                                            } else {
                                                // another branch
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#elseexpression

                                    The method pollMplsSdps uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                    Open

                                                } else {
                                                    //Fixme implement ipv6 conversion
                                                    //$value['sdpFarEndInetAddress'] might still be any of these:
                                                    //  -> unknown(0), ipv4(1), ipv6(2), ipv4z(3), ipv6z(4), dns(16)
                                    
                                    
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    ElseExpression

                                    Since: 1.4.0

                                    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                    Example

                                    class Foo
                                    {
                                        public function bar($flag)
                                        {
                                            if ($flag) {
                                                // one branch
                                            } else {
                                                // another branch
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/cleancode.html#elseexpression

                                    Avoid unused local variables such as '$entry'.
                                    Open

                                            foreach ($data as $index => $entry) {
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$entry'.
                                    Open

                                            foreach ($data as $index => $entry) {
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$preemptionPending'.
                                    Open

                                            $preemptionPending = 0b00001000;
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$entry'.
                                    Open

                                            foreach ($data as $index => $entry) {
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$preemptionPending'.
                                    Open

                                            $preemptionPending = 0b00001000;
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$entry'.
                                    Open

                                            foreach ($data as $index => $entry) {
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$nodeId'.
                                    Open

                                            $nodeId = 0b00000100;
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$entry'.
                                    Open

                                            foreach ($data as $index => $entry) {
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                                    Avoid unused local variables such as '$nodeId'.
                                    Open

                                            $nodeId = 0b00000100;
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    UnusedLocalVariable

                                    Since: 0.2

                                    Detects when a local variable is declared and/or assigned, but not used.

                                    Example

                                    class Foo {
                                        public function doSomething()
                                        {
                                            $i = 5; // Unused
                                        }
                                    }

                                    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

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

                                        public function discoverMplsServices()
                                        {
                                            $mplsSvcCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'svcBaseInfoTable', [], 'TIMETRA-SERV-MIB', 'nokia', '-OQUst');
                                            $mplsSvcCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'svcTlsInfoTable', $mplsSvcCache, 'TIMETRA-SERV-MIB', 'nokia', '-OQUst');
                                    
                                    
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 1 other location - About 2 days to fix
                                    LibreNMS/OS/Timos.php on lines 613..653

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

                                    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 pollMplsServices()
                                        {
                                            $mplsSvcCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'svcBaseInfoTable', [], 'TIMETRA-SERV-MIB', 'nokia', '-OQUst');
                                            $mplsSvcCache = snmpwalk_cache_multi_oid($this->getDeviceArray(), 'svcTlsInfoTable', $mplsSvcCache, 'TIMETRA-SERV-MIB', 'nokia', '-OQUst');
                                    
                                    
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 1 other location - About 2 days to fix
                                    LibreNMS/OS/Timos.php on lines 259..300

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

                                    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 (isset($mplsTunnelARHopListIndex, $mplsTunnelARHopIndex, $lsp_path_id)) {
                                                    $arhops->push(new MplsTunnelArHop([
                                                        'mplsTunnelARHopListIndex' => $mplsTunnelARHopListIndex,
                                                        'mplsTunnelARHopIndex' => $mplsTunnelARHopIndex,
                                                        'lsp_path_id' => $lsp_path_id,
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 1 other location - About 3 hrs to fix
                                    LibreNMS/OS/Timos.php on lines 810..827

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

                                    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 (isset($mplsTunnelARHopListIndex, $mplsTunnelARHopIndex, $lsp_path_id)) {
                                                    $arhops->push(new MplsTunnelArHop([
                                                        'mplsTunnelARHopListIndex' => $mplsTunnelARHopListIndex,
                                                        'mplsTunnelARHopIndex' => $mplsTunnelARHopIndex,
                                                        'lsp_path_id' => $lsp_path_id,
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 1 other location - About 3 hrs to fix
                                    LibreNMS/OS/Timos.php on lines 423..440

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

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

                                        public function discoverWirelessSnr()
                                        {
                                            $sensors = [];
                                    
                                            $data = snmpwalk_cache_oid($this->getDeviceArray(), 'tmnxCellPortSinr', [], 'TIMETRA-CELLULAR-MIB');
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 5 other locations - About 2 hrs to fix
                                    LibreNMS/OS/Ericsson6600.php on lines 41..62
                                    LibreNMS/OS/Ericsson6600.php on lines 64..85
                                    LibreNMS/OS/EricssonTn.php on lines 64..85
                                    LibreNMS/OS/Timos.php on lines 886..907
                                    LibreNMS/OS/Timos.php on lines 949..970

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

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

                                        public function discoverWirelessRsrq()
                                        {
                                            $sensors = [];
                                    
                                            $data = snmpwalk_cache_oid($this->getDeviceArray(), 'tmnxCellPortRsrq', [], 'TIMETRA-CELLULAR-MIB');
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 5 other locations - About 2 hrs to fix
                                    LibreNMS/OS/Ericsson6600.php on lines 41..62
                                    LibreNMS/OS/Ericsson6600.php on lines 64..85
                                    LibreNMS/OS/EricssonTn.php on lines 64..85
                                    LibreNMS/OS/Timos.php on lines 863..884
                                    LibreNMS/OS/Timos.php on lines 949..970

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

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

                                        public function discoverWirelessChannel()
                                        {
                                            $sensors = [];
                                    
                                            $data = snmpwalk_cache_oid($this->getDeviceArray(), 'tmnxCellPortChannelNumber', [], 'TIMETRA-CELLULAR-MIB');
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 5 other locations - About 2 hrs to fix
                                    LibreNMS/OS/Ericsson6600.php on lines 41..62
                                    LibreNMS/OS/Ericsson6600.php on lines 64..85
                                    LibreNMS/OS/EricssonTn.php on lines 64..85
                                    LibreNMS/OS/Timos.php on lines 863..884
                                    LibreNMS/OS/Timos.php on lines 886..907

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

                                    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 discoverWirelessRsrp()
                                        {
                                            $sensors = [];
                                    
                                            $data = snmpwalk_cache_oid($this->getDeviceArray(), 'tmnxCellPortRsrp', [], 'TIMETRA-CELLULAR-MIB');
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 1 other location - About 1 hr to fix
                                    LibreNMS/OS/Timos.php on lines 909..927

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

                                    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 discoverWirelessRssi()
                                        {
                                            $sensors = [];
                                    
                                            $data = snmpwalk_cache_oid($this->getDeviceArray(), 'tmnxCellPortRssi', [], 'TIMETRA-CELLULAR-MIB');
                                    Severity: Major
                                    Found in LibreNMS/OS/Timos.php and 1 other location - About 1 hr to fix
                                    LibreNMS/OS/Timos.php on lines 929..947

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

                                    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

                                    Avoid excessively long variable names like $specialQinQIdentifier. Keep variable name length under 20.
                                    Open

                                                $specialQinQIdentifier = $this->nokiaEncap($sapEncapValue);
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $mplsTunnelARHopListIndex. Keep variable name length under 20.
                                    Open

                                                [$mplsTunnelARHopListIndex, $mplsTunnelARHopIndex] = explode('.', $key);
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $mplsTunnelARHopListIndex. Keep variable name length under 20.
                                    Open

                                                [$mplsTunnelARHopListIndex, $mplsTunnelARHopIndex] = explode('.', $key);
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $mplsTunnelCHopListIndex. Keep variable name length under 20.
                                    Open

                                                [$mplsTunnelCHopListIndex, $mplsTunnelCHopIndex] = explode('.', $key);
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid excessively long variable names like $mplsTunnelCHopListIndex. Keep variable name length under 20.
                                    Open

                                                [$mplsTunnelCHopListIndex, $mplsTunnelCHopIndex] = explode('.', $key);
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    LongVariable

                                    Since: 0.2

                                    Detects when a field, formal or local variable is declared with a long name.

                                    Example

                                    class Something {
                                        protected $reallyLongIntName = -3; // VIOLATION - Field
                                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                            $otherReallyLongName = -5; // VIOLATION - Local
                                            for ($interestingIntIndex = 0; // VIOLATION - For
                                                 $interestingIntIndex < 10;
                                                 $interestingIntIndex++ ) {
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#longvariable

                                    Avoid variables with short names like $ip. Configured minimum length is 3.
                                    Open

                                                    $ip = long2ip(hexdec(str_replace(' ', '', $value['sdpFarEndInetAddress'])));
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    ShortVariable

                                    Since: 0.2

                                    Detects when a field, local, or parameter has a very short name.

                                    Example

                                    class Something {
                                        private $q = 15; // VIOLATION - Field
                                        public static function main( array $as ) { // VIOLATION - Formal
                                            $r = 20 + $this->q; // VIOLATION - Local
                                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                                $r += $this->q;
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#shortvariable

                                    Avoid variables with short names like $tx. Configured minimum length is 3.
                                    Open

                                            $tx = snmpwalk_cache_oid($this->getDeviceArray(), 'aluMwRadioLocalTxPower', [], 'ALU-MICROWAVE-MIB');
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    ShortVariable

                                    Since: 0.2

                                    Detects when a field, local, or parameter has a very short name.

                                    Example

                                    class Something {
                                        private $q = 15; // VIOLATION - Field
                                        public static function main( array $as ) { // VIOLATION - Formal
                                            $r = 20 + $this->q; // VIOLATION - Local
                                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                                $r += $this->q;
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#shortvariable

                                    Avoid variables with short names like $hw. Configured minimum length is 3.
                                    Open

                                            $hw = snmpwalk_group($this->getDeviceArray(), 'tmnxHwClass', 'TIMETRA-CHASSIS-MIB');
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    ShortVariable

                                    Since: 0.2

                                    Detects when a field, local, or parameter has a very short name.

                                    Example

                                    class Something {
                                        private $q = 15; // VIOLATION - Field
                                        public static function main( array $as ) { // VIOLATION - Formal
                                            $r = 20 + $this->q; // VIOLATION - Local
                                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                                $r += $this->q;
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#shortvariable

                                    Avoid variables with short names like $ip. Configured minimum length is 3.
                                    Open

                                                    $ip = long2ip(hexdec(str_replace(' ', '', $value['sdpFarEndInetAddress'])));
                                    Severity: Minor
                                    Found in LibreNMS/OS/Timos.php by phpmd

                                    ShortVariable

                                    Since: 0.2

                                    Detects when a field, local, or parameter has a very short name.

                                    Example

                                    class Something {
                                        private $q = 15; // VIOLATION - Field
                                        public static function main( array $as ) { // VIOLATION - Formal
                                            $r = 20 + $this->q; // VIOLATION - Local
                                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                                $r += $this->q;
                                            }
                                        }
                                    }

                                    Source https://phpmd.org/rules/naming.html#shortvariable

                                    There are no issues that match your filters.

                                    Category
                                    Status