detain/myadmin-softaculous-licensing

View on GitHub
src/SoftaculousNOC.php

Summary

Maintainability
F
5 days
Test Coverage

File SoftaculousNOC.php has 627 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Softaculous Related Functionality
 * @author Joe Huss <detain@interserver.net>
 * @copyright 2020
Severity: Major
Found in src/SoftaculousNOC.php - About 1 day to fix

    SoftaculousNOC has 46 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class SoftaculousNOC
    {
        private $nocname = 'username';
        private $nocpass = 'password';
        public $softaculous = 'https://www.softaculous.com/noc';
    Severity: Minor
    Found in src/SoftaculousNOC.php - About 6 hrs to fix

      Function array2json has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

      function array2json($arr)
      {
          if (function_exists('json_encode')) {
              return json_encode($arr);
          } //Lastest versions of PHP already has this functionality.
      Severity: Minor
      Found in src/SoftaculousNOC.php - About 4 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function sitemush_refund_and_cancel has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          public function sitemush_refund_and_cancel($key = '', $ip = '', $force = 0)
          {
              if (!empty($ip)) {
                  // Search for a license
                  $lic = $this->sitemush_licenses('', $ip);
      Severity: Minor
      Found in src/SoftaculousNOC.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function refund_and_cancel has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          public function refund_and_cancel($key = '', $ip = '', $force = 0)
          {
              if (!empty($ip)) {
                  // Search for a license
                  $lic = $this->licenses('', $ip);
      Severity: Minor
      Found in src/SoftaculousNOC.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function webuzo_refund_and_cancel has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          public function webuzo_refund_and_cancel($key = '', $ip = '', $force = 0)
          {
              if (!empty($ip)) {
                  // Search for a license
                  $lic = $this->webuzo_licenses('', $ip);
      Severity: Minor
      Found in src/SoftaculousNOC.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function virt_refund_and_cancel has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          public function virt_refund_and_cancel($key = '', $ip = '', $force = 0)
          {
              if (!empty($ip)) {
                  // Search for a license
                  $lic = $this->virt_licenses('', $ip);
      Severity: Minor
      Found in src/SoftaculousNOC.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method array2json has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function array2json($arr)
      {
          if (function_exists('json_encode')) {
              return json_encode($arr);
          } //Lastest versions of PHP already has this functionality.
      Severity: Minor
      Found in src/SoftaculousNOC.php - About 1 hr to fix

        Function toArray has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

            public function toArray($xml)
            {
                if (is_string($xml)) {
                    $xml = new SimpleXMLElement($xml);
                }
        Severity: Minor
        Found in src/SoftaculousNOC.php - About 1 hr 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 toXML has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

            public function toXML($data, $rootNodeName = 'ResultSet', $xml=null)
            {
        
                // turn off compatibility mode as simple xml throws a wobbly if you don't.
                if (ini_get('zend.ze1_compatibility_mode') == 1) {
        Severity: Minor
        Found in src/SoftaculousNOC.php - About 1 hr 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

        Method req has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function req()
            {
                $url = $this->softaculous.'?';
        
                foreach ($this->params as $k => $v) {
        Severity: Minor
        Found in src/SoftaculousNOC.php - About 1 hr to fix

          Method buy has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function buy($ip, $toadd, $servertype, $authemail, $autorenew, $buy_sitepad = 0)
          Severity: Minor
          Found in src/SoftaculousNOC.php - About 45 mins to fix

            Method sitemush_licenses has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function sitemush_licenses($key = '', $ip = '', $expiry = '', $start = 0, $len = 1000000, $email = '')
            Severity: Minor
            Found in src/SoftaculousNOC.php - About 45 mins to fix

              Method webuzo_licenses has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function webuzo_licenses($key = '', $ip = '', $expiry = '', $start = 0, $len = 1000000, $email = '')
              Severity: Minor
              Found in src/SoftaculousNOC.php - About 45 mins to fix

                Method licenses has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function licenses($key = '', $ip = '', $expiry = '', $start = 0, $len = 1000000, $email = '')
                Severity: Minor
                Found in src/SoftaculousNOC.php - About 45 mins to fix

                  Method virt_licenses has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function virt_licenses($key = '', $ip = '', $expiry = '', $start = 0, $len = 1000000, $email = '')
                  Severity: Minor
                  Found in src/SoftaculousNOC.php - About 45 mins to fix

                    Method webuzo_buy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public function webuzo_buy($ip, $toadd, $servertype, $authemail, $autorenew)
                    Severity: Minor
                    Found in src/SoftaculousNOC.php - About 35 mins to fix

                      The class SoftaculousNOC has 1043 lines of code. Current threshold is 1000. Avoid really long classes.
                      Open

                      class SoftaculousNOC
                      {
                          private $nocname = 'username';
                          private $nocpass = 'password';
                          public $softaculous = 'https://www.softaculous.com/noc';
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      Avoid using undefined variables such as '$response' which will lead to PHP notices.
                      Open

                              myadmin_log('licenses', 'info', '<pre>'.json_encode($response).'</pre>', __LINE__, __FILE__);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      UndefinedVariable

                      Since: 2.8.0

                      Detects when a variable is used that has not been defined before.

                      Example

                      class Foo
                      {
                          private function bar()
                          {
                              // $message is undefined
                              echo $message;
                          }
                      }

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

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

                                  foreach ($logs['actions'] as $k => $v) {
                      Severity: Minor
                      Found in src/SoftaculousNOC.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 '$response'.
                      Open

                              myadmin_log('licenses', 'info', '<pre>'.json_encode($response).'</pre>', __LINE__, __FILE__);
                      Severity: Minor
                      Found in src/SoftaculousNOC.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 '$k'.
                      Open

                                  foreach ($logs['actions'] as $k => $v) {
                      Severity: Minor
                      Found in src/SoftaculousNOC.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 '$k'.
                      Open

                                  foreach ($logs['actions'] as $k => $v) {
                      Severity: Minor
                      Found in src/SoftaculousNOC.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 '$k'.
                      Open

                                  foreach ($logs['actions'] as $k => $v) {
                      Severity: Minor
                      Found in src/SoftaculousNOC.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

                      TODO found
                      Open

                                  // :TODO: Is there any more datatype we should be in the lookout for? (Object?)
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by fixme

                      Avoid using short method names like SoftaculousNOC::r(). The configured minimum method name length is 3.
                      Open

                          public function r($r)
                          {
                              if (empty($r)) {
                                  $r = $this->error;
                              }
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      ShortMethodName

                      Since: 0.2

                      Detects when very short method names are used.

                      Example

                      class ShortMethod {
                          public function a( $index ) { // Violation
                          }
                      }

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

                      The property $raw_response is not named in camelCase.
                      Open

                      class SoftaculousNOC
                      {
                          private $nocname = 'username';
                          private $nocpass = 'password';
                          public $softaculous = 'https://www.softaculous.com/noc';
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCasePropertyName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name attributes.

                      Example

                      class ClassName {
                          protected $property_name;
                      }

                      Source

                      The parameter $buy_sitepad is not named in camelCase.
                      Open

                          public function buy($ip, $toadd, $servertype, $authemail, $autorenew, $buy_sitepad = 0)
                          {
                              $this->params['ca'] = 'softaculous_buy';
                              $this->params['purchase'] = 1;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseParameterName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name parameters.

                      Example

                      class ClassName {
                          public function doSomething($user_name) {
                          }
                      }

                      Source

                      The variable $my_lic is not named in camelCase.
                      Open

                          public function virt_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->virt_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $my_lic is not named in camelCase.
                      Open

                          public function sitemush_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->sitemush_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $is_list is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $my_lic is not named in camelCase.
                      Open

                          public function refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $is_list is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $is_list is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $is_list is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $max_length is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $is_list is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $my_lic is not named in camelCase.
                      Open

                          public function virt_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->virt_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $buy_sitepad is not named in camelCase.
                      Open

                          public function buy($ip, $toadd, $servertype, $authemail, $autorenew, $buy_sitepad = 0)
                          {
                              $this->params['ca'] = 'softaculous_buy';
                              $this->params['purchase'] = 1;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $my_lic is not named in camelCase.
                      Open

                          public function sitemush_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->sitemush_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $is_list is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $my_lic is not named in camelCase.
                      Open

                          public function refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $max_length is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $my_lic is not named in camelCase.
                      Open

                          public function webuzo_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->webuzo_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $my_lic is not named in camelCase.
                      Open

                          public function webuzo_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->webuzo_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The variable $max_length is not named in camelCase.
                      Open

                      function array2json($arr)
                      {
                          if (function_exists('json_encode')) {
                              return json_encode($arr);
                          } //Lastest versions of PHP already has this functionality.
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseVariableName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name variables.

                      Example

                      class ClassName {
                          public function doSomething() {
                              $data_module = new DataModule();
                          }
                      }

                      Source

                      The method sitemush_removeautorenewal is not named in camelCase.
                      Open

                          public function sitemush_removeautorenewal($key = '')
                          {
                              $this->params['ca'] = 'sitemush_renewals';
                              $this->params['cancelrenewal'] = 1;
                              $this->params['lickey'] = $key;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_licenses is not named in camelCase.
                      Open

                          public function virt_licenses($key = '', $ip = '', $expiry = '', $start = 0, $len = 1000000, $email = '')
                          {
                              $this->params['ca'] = 'virtualizor';
                              $this->params['lickey'] = $key;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_remove is not named in camelCase.
                      Open

                          public function virt_remove($key, $force = 0)
                          {
                              $this->params['ca'] = 'virtualizor_cancel';
                              $this->params['lickey'] = $key;
                              $this->params['cancel_license'] = 1;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_buy is not named in camelCase.
                      Open

                          public function webuzo_buy($ip, $toadd, $servertype, $authemail, $autorenew)
                          {
                              $this->params['ca'] = 'webuzo_buy';
                              $this->params['purchase'] = 1;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_refund is not named in camelCase.
                      Open

                          public function webuzo_refund($actid)
                          {
                              $this->params['ca'] = 'webuzo_refund';
                              $this->params['actid'] = $actid;
                              return $this->req();
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_removeautorenewal is not named in camelCase.
                      Open

                          public function webuzo_removeautorenewal($key = '')
                          {
                              $this->params['ca'] = 'webuzo_renewals';
                              $this->params['cancelrenewal'] = 1;
                              $this->params['lickey'] = $key;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_removeautorenewal is not named in camelCase.
                      Open

                          public function virt_removeautorenewal($key = '')
                          {
                              $this->params['ca'] = 'virtualizor_renewals';
                              $this->params['cancelrenewal'] = 1;
                              $this->params['lickey'] = $key;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method APIunserialize is not named in camelCase.
                      Open

                          public function APIunserialize($response)
                          {
                              if (!empty($this->json)) {
                                  return json_decode($response, true);
                              }
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_licenselogs is not named in camelCase.
                      Open

                          public function webuzo_licenselogs($key, $limit = 0, $ip = '')
                          {
                              $this->params['ca'] = 'webuzo_licenselogs';
                              $this->params['key'] = $key;
                              $this->params['licip'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_refund_and_cancel is not named in camelCase.
                      Open

                          public function webuzo_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->webuzo_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_addautorenewal is not named in camelCase.
                      Open

                          public function webuzo_addautorenewal($key = '')
                          {
                              $this->params['ca'] = 'webuzo_renewals';
                              $this->params['addrenewal'] = 1;
                              $this->params['lickey'] = $key;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_refund_and_cancel is not named in camelCase.
                      Open

                          public function virt_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->virt_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_editips is not named in camelCase.
                      Open

                          public function virt_editips($lid, $ips)
                          {
                              $this->params['ca'] = 'virtualizor_showlicense';
                              $this->params['lid'] = $lid;
                              $this->params['ips'] = $ips;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_licenselogs is not named in camelCase.
                      Open

                          public function virt_licenselogs($key, $limit = 0, $ip = '')
                          {
                              $this->params['ca'] = 'virtualizor_licenselogs';
                              $this->params['key'] = $key;
                              $this->params['licip'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_licenses is not named in camelCase.
                      Open

                          public function sitemush_licenses($key = '', $ip = '', $expiry = '', $start = 0, $len = 1000000, $email = '')
                          {
                              $this->params['ca'] = 'sitemush';
                              $this->params['lickey'] = $key;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_remove is not named in camelCase.
                      Open

                          public function sitemush_remove($key, $force = 0)
                          {
                              $this->params['ca'] = 'sitemush_cancel';
                              $this->params['lickey'] = $key;
                              $this->params['cancel_license'] = 1;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_editips is not named in camelCase.
                      Open

                          public function sitemush_editips($lid, $ips)
                          {
                              $this->params['ca'] = 'sitemush_showlicense';
                              $this->params['lid'] = $lid;
                              $this->params['ips'] = $ips;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_addautorenewal is not named in camelCase.
                      Open

                          public function virt_addautorenewal($key = '')
                          {
                              $this->params['ca'] = 'virtualizor_renewals';
                              $this->params['addrenewal'] = 1;
                              $this->params['lickey'] = $key;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_refund is not named in camelCase.
                      Open

                          public function virt_refund($actid)
                          {
                              $this->params['ca'] = 'virtualizor_refund';
                              $this->params['actid'] = $actid;
                              return $this->req();
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_licenselogs is not named in camelCase.
                      Open

                          public function sitemush_licenselogs($key, $limit = 0, $ip = '')
                          {
                              $this->params['ca'] = 'sitemush_licenselogs';
                              $this->params['key'] = $key;
                              $this->params['licip'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_licenses is not named in camelCase.
                      Open

                          public function webuzo_licenses($key = '', $ip = '', $expiry = '', $start = 0, $len = 1000000, $email = '')
                          {
                              $this->params['ca'] = 'webuzo';
                              $this->params['lickey'] = $key;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_cancel is not named in camelCase.
                      Open

                          public function webuzo_cancel($key = '', $ip = '', $force = 0)
                          {
                              $this->params['ca'] = 'webuzo_cancel';
                              $this->params['lickey'] = $key;
                              $this->params['licip'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_buy is not named in camelCase.
                      Open

                          public function sitemush_buy($ip, $toadd, $autorenew)
                          {
                              $this->params['ca'] = 'sitemush_buy';
                              $this->params['purchase'] = 1;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_refund is not named in camelCase.
                      Open

                          public function sitemush_refund($actid)
                          {
                              $this->params['ca'] = 'sitemush_refund';
                              $this->params['actid'] = $actid;
                              return $this->req();
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_refund_and_cancel is not named in camelCase.
                      Open

                          public function sitemush_refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->sitemush_licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method refund_and_cancel is not named in camelCase.
                      Open

                          public function refund_and_cancel($key = '', $ip = '', $force = 0)
                          {
                              if (!empty($ip)) {
                                  // Search for a license
                                  $lic = $this->licenses('', $ip);
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_editips is not named in camelCase.
                      Open

                          public function webuzo_editips($lid, $ips)
                          {
                              $this->params['ca'] = 'webuzo_showlicense';
                              $this->params['lid'] = $lid;
                              $this->params['ips'] = $ips;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_buy is not named in camelCase.
                      Open

                          public function virt_buy($ip, $toadd, $autorenew)
                          {
                              $this->params['ca'] = 'virtualizor_buy';
                              $this->params['purchase'] = 1;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method virt_renewals is not named in camelCase.
                      Open

                          public function virt_renewals($key = '', $ip = '', $start = 0, $len = 1000000)
                          {
                              $this->params['ca'] = 'virtualizor_renewals';
                              $this->params['lickey'] = $key;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_renewals is not named in camelCase.
                      Open

                          public function sitemush_renewals($key = '', $ip = '', $start = 0, $len = 1000000)
                          {
                              $this->params['ca'] = 'sitemush_renewals';
                              $this->params['lickey'] = $key;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method webuzo_autorenewals is not named in camelCase.
                      Open

                          public function webuzo_autorenewals($key = '', $ip = '', $start = 0, $len = 1000000)
                          {
                              $this->params['ca'] = 'webuzo_renewals';
                              $this->params['lickey'] = $key;
                              $this->params['ips'] = $ip;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      The method sitemush_addautorenewal is not named in camelCase.
                      Open

                          public function sitemush_addautorenewal($key = '')
                          {
                              $this->params['ca'] = 'sitemush_renewals';
                              $this->params['addrenewal'] = 1;
                              $this->params['lickey'] = $key;
                      Severity: Minor
                      Found in src/SoftaculousNOC.php by phpmd

                      CamelCaseMethodName

                      Since: 0.2

                      It is considered best practice to use the camelCase notation to name methods.

                      Example

                      class ClassName {
                          public function get_name() {
                          }
                      }

                      Source

                      There are no issues that match your filters.

                      Category
                      Status