detain/myadmin-cpanel-webhosting

View on GitHub
src/xmlapi.php

Summary

Maintainability
F
1 wk
Test Coverage

The method xmlapi::xmlapi_query() calls the typical debug function print_r() which is mostly only used during development.
Open

                error_log("SimpleXML var_dump:\n" . print_r($response, true));
Severity: Minor
Found in src/xmlapi.php by phpmd

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

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

The method xmlapi::xmlapi_query() calls the typical debug function print_r() which is mostly only used during development.
Open

                error_log("Associative Array var_dump:\n" . print_r($response, true));
Severity: Minor
Found in src/xmlapi.php by phpmd

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

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

File xmlapi.php has 1064 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
* cPanel XMLAPI Client Class
*
* This class allows for easy interaction with cPanel's XML-API allow functions within the XML-API to be called
Severity: Major
Found in src/xmlapi.php - About 2 days to fix

    xmlapi has 104 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class xmlapi
    {
        // should debugging statements be printed?
        private $debug            = false;
    
    
    Severity: Major
    Found in src/xmlapi.php - About 2 days to fix

      Function __construct has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
      Open

          public function __construct($host = null, $user = null, $password = null)
          {
              // Check if debugging must be enabled
              if ((defined('XMLAPI_DEBUG')) && (XMLAPI_DEBUG == '1')) {
                  $this->debug = true;
      Severity: Minor
      Found in src/xmlapi.php - About 3 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function xmlapi_query has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
      Open

          public function xmlapi_query($function, $vars = [])
          {
              // Check to make sure all the data needed to perform the query is in place
              if (!$function) {
                  throw new Exception('xmlapi_query() requires a function to be passed to it');
      Severity: Minor
      Found in src/xmlapi.php - About 3 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Method xmlapi_query has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function xmlapi_query($function, $vars = [])
          {
              // Check to make sure all the data needed to perform the query is in place
              if (!$function) {
                  throw new Exception('xmlapi_query() requires a function to be passed to it');
      Severity: Major
      Found in src/xmlapi.php - About 2 hrs to fix

        Method __construct has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function __construct($host = null, $user = null, $password = null)
            {
                // Check if debugging must be enabled
                if ((defined('XMLAPI_DEBUG')) && (XMLAPI_DEBUG == '1')) {
                    $this->debug = true;
        Severity: Minor
        Found in src/xmlapi.php - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                  if (!isset($args['xemail']) || !isset($args['host']) || !isset($args['country']) || !isset($args['state']) || !isset($args['city']) || !isset($args['co']) || !isset($args['cod']) || !isset($args['email']) || !isset($args['pass'])) {
                      error_log("generatessl requires that xemail, host, country, state, city, co, cod, email and pass are defined in the array passed to it");
          
                      return false;
                  }
          Severity: Critical
          Found in src/xmlapi.php - About 1 hr to fix

            Function setresellerpackagelimits has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                public function setresellerpackagelimits($user, $no_limit, $package = null, $allowed = null, $number = null)
                {
                    if (!isset($user) || !isset($no_limit)) {
                        error_log("setresellerpackagelimits requires that a username and no_limit are passed to it by default");
            
            
            Severity: Minor
            Found in src/xmlapi.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 api1_query has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function api1_query($user, $module, $function, $args = [])
                {
                    if (!isset($module) || !isset($function) || !isset($user)) {
                        error_log("api1_query requires that a module and function are passed to it");
            
            
            Severity: Minor
            Found in src/xmlapi.php - About 1 hr to fix

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

                  public function setresellerpackagelimits($user, $no_limit, $package = null, $allowed = null, $number = null)
                  {
                      if (!isset($user) || !isset($no_limit)) {
                          error_log("setresellerpackagelimits requires that a username and no_limit are passed to it by default");
              
              
              Severity: Minor
              Found in src/xmlapi.php - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                        if (!isset($args['user']) || !isset($args['domain']) || !isset($args['cert']) || !isset($args['key']) || !isset($args['cab']) || !isset($args['ip'])) {
                            error_log("installssl requires that user, domain, cert, key, cab and ip are defined in the array passed to it");
                
                            return false;
                        }
                Severity: Major
                Found in src/xmlapi.php - About 40 mins to fix

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

                      public function setresellerpackagelimits($user, $no_limit, $package = null, $allowed = null, $number = null)
                  Severity: Minor
                  Found in src/xmlapi.php - About 35 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return $response;
                    Severity: Major
                    Found in src/xmlapi.php - About 30 mins to fix

                      Function stat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function stat($username, $args = null)
                          {
                              if ((!isset($username)) || (!isset($args))) {
                                  error_log("stat requires that a username and options are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 xmlapi has 2338 lines of code. Current threshold is 1000. Avoid really long classes.
                      Open

                      class xmlapi
                      {
                          // should debugging statements be printed?
                          private $debug            = false;
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

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

                              curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
                      Severity: Minor
                      Found in src/xmlapi.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 using undefined variables such as '$values' which will lead to PHP notices.
                      Open

                                  $values['display'] = substr($args, 0, -1);
                      Severity: Minor
                      Found in src/xmlapi.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 using undefined variables such as '$values' which will lead to PHP notices.
                      Open

                              return $this->api2_query($username, 'StatsBar', 'stat', $values);
                      Severity: Minor
                      Found in src/xmlapi.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 using undefined variables such as '$header' which will lead to PHP notices.
                      Open

                              $header[0] =$authstr .
                      Severity: Minor
                      Found in src/xmlapi.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 using undefined variables such as '$values' which will lead to PHP notices.
                      Open

                                  $values['display'] = substr($display, 0, -1);
                      Severity: Minor
                      Found in src/xmlapi.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

                      Missing class import via use statement (line '759', column '23').
                      Open

                                  throw new Exception("curl_exec threw error \"" . curl_error($curl) . "\" for " . $url . "?" . $postdata);
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '343', column '23').
                      Open

                                  throw new Exception('non integer or negative integer passed to set_port');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '663', column '23').
                      Open

                                  throw new Exception('invalid auth_type set');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '378', column '23').
                      Open

                                  throw new Exception('https and http are the only protocols that can be passed to set_protocol');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '417', column '23').
                      Open

                                  throw new Exception('json, xml, array and simplexml are the only allowed values for set_output');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '591', column '23').
                      Open

                                  throw new Exception('only curl and fopen and allowed http clients');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '236', column '27').
                      Open

                                      throw new Exception("No host defined");
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '253', column '23').
                      Open

                                  throw new Exception('allow_url_fopen and curl are neither available in this PHP configuration');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '636', column '23').
                      Open

                                  throw new Exception('no authentication information has been set');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '451', column '23').
                      Open

                                  throw new Exception('the only two allowable auth types arehash and path');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '628', column '23').
                      Open

                                  throw new Exception('xmlapi_query() requires a function to be passed to it');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '769', column '23').
                      Open

                                  throw new Exception('fopen_query called on system without allow_url_fopen enabled in php.ini');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

                      Missing class import via use statement (line '632', column '23').
                      Open

                                  throw new Exception('no user has been set');
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      MissingImport

                      Since: 2.7.0

                      Importing all external classes in a file through use statements makes them clearly visible.

                      Example

                      function make() {
                          return new \stdClass();
                      }

                      Source http://phpmd.org/rules/cleancode.html#MissingImport

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

                                  foreach ($args as $key => $value) {
                      Severity: Minor
                      Found in src/xmlapi.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 using count() function in for loops.
                      Open

                              for ($int = 0; $int < count($args);  $int++) {
                                  $call['arg-' . $int] = $args[$int];
                              }
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      CountInLoopExpression

                      Since: 2.7.0

                      Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.

                      Example

                      class Foo {
                      
                        public function bar()
                        {
                          $array = array();
                      
                          for ($i = 0; count($array); $i++) {
                            // ...
                          }
                        }
                      }

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

                      The parameter $no_limit is not named in camelCase.
                      Open

                          public function setresellerpackagelimits($user, $no_limit, $package = null, $allowed = null, $number = null)
                          {
                              if (!isset($user) || !isset($no_limit)) {
                                  error_log("setresellerpackagelimits requires that a username and no_limit are passed to it by default");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 class xmlapi is not named in CamelCase.
                      Open

                      class xmlapi
                      {
                          // should debugging statements be printed?
                          private $debug            = false;
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      CamelCaseClassName

                      Since: 0.2

                      It is considered best practice to use the CamelCase notation to name classes.

                      Example

                      class class_name {
                      }

                      Source

                      The property $auth_type is not named in camelCase.
                      Open

                      class xmlapi
                      {
                          // should debugging statements be printed?
                          private $debug            = false;
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $reseller_cfg is not named in camelCase.
                      Open

                          public function setresellerlimits($reseller_cfg)
                          {
                              if (!isset($reseller_cfg['user'])) {
                                  error_log("setresellerlimits requires that a user is defined in the array passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 parameter $auth_type is not named in camelCase.
                      Open

                          public function set_auth_type($auth_type)
                          {
                              if ($auth_type != 'hash' && $auth_type != 'pass') {
                                  throw new Exception('the only two allowable auth types arehash and path');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 property $http_client is not named in camelCase.
                      Open

                      class xmlapi
                      {
                          // should debugging statements be printed?
                          private $debug            = false;
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 'get_debug()' method which returns a boolean should be named 'is...()' or 'has...()'
                      Open

                          public function get_debug()
                          {
                              return $this->debug;
                          }
                      Severity: Minor
                      Found in src/xmlapi.php by phpmd

                      BooleanGetMethodName

                      Since: 0.2

                      Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

                      Example

                      class Foo {
                          /**
                           * @return boolean
                           */
                          public function getFoo() {} // bad
                          /**
                           * @return bool
                           */
                          public function isFoo(); // ok
                          /**
                           * @return boolean
                           */
                          public function getFoo($bar); // ok, unless checkParameterizedMethods=true
                      }

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

                      The variable $auth_type is not named in camelCase.
                      Open

                          public function set_auth_type($auth_type)
                          {
                              if ($auth_type != 'hash' && $auth_type != 'pass') {
                                  throw new Exception('the only two allowable auth types arehash and path');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 $reseller_cfg is not named in camelCase.
                      Open

                          public function setresellerlimits($reseller_cfg)
                          {
                              if (!isset($reseller_cfg['user'])) {
                                  error_log("setresellerlimits requires that a user is defined in the array passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $query_type is not named in camelCase.
                      Open

                          public function xmlapi_query($function, $vars = [])
                          {
                              // Check to make sure all the data needed to perform the query is in place
                              if (!$function) {
                                  throw new Exception('xmlapi_query() requires a function to be passed to it');
                      Severity: Minor
                      Found in src/xmlapi.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 $module_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $query_type is not named in camelCase.
                      Open

                          public function xmlapi_query($function, $vars = [])
                          {
                              // Check to make sure all the data needed to perform the query is in place
                              if (!$function) {
                                  throw new Exception('xmlapi_query() requires a function to be passed to it');
                      Severity: Minor
                      Found in src/xmlapi.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 $func_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $module_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $func_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $api_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $auth_type is not named in camelCase.
                      Open

                          public function set_auth_type($auth_type)
                          {
                              if ($auth_type != 'hash' && $auth_type != 'pass') {
                                  throw new Exception('the only two allowable auth types arehash and path');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 $api_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $api_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $func_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $func_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $api_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $no_limit is not named in camelCase.
                      Open

                          public function setresellerpackagelimits($user, $no_limit, $package = null, $allowed = null, $number = null)
                          {
                              if (!isset($user) || !isset($no_limit)) {
                                  error_log("setresellerpackagelimits requires that a username and no_limit are passed to it by default");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $query_type is not named in camelCase.
                      Open

                          public function xmlapi_query($function, $vars = [])
                          {
                              // Check to make sure all the data needed to perform the query is in place
                              if (!$function) {
                                  throw new Exception('xmlapi_query() requires a function to be passed to it');
                      Severity: Minor
                      Found in src/xmlapi.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 $module_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $module_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $module_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $func_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $auth_type is not named in camelCase.
                      Open

                          public function set_auth_type($auth_type)
                          {
                              if ($auth_type != 'hash' && $auth_type != 'pass') {
                                  throw new Exception('the only two allowable auth types arehash and path');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 $no_limit is not named in camelCase.
                      Open

                          public function setresellerpackagelimits($user, $no_limit, $package = null, $allowed = null, $number = null)
                          {
                              if (!isset($user) || !isset($no_limit)) {
                                  error_log("setresellerpackagelimits requires that a username and no_limit are passed to it by default");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $api_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $api_type is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $func_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $reseller_cfg is not named in camelCase.
                      Open

                          public function setresellerlimits($reseller_cfg)
                          {
                              if (!isset($reseller_cfg['user'])) {
                                  error_log("setresellerlimits requires that a user is defined in the array passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 $module_type is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 set_debug is not named in camelCase.
                      Open

                          public function set_debug($debug = 1)
                          {
                              $this->debug = $debug;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 fopen_query is not named in camelCase.
                      Open

                          private function fopen_query($url, $postdata, $authstr)
                          {
                              if (!(ini_get('allow_url_fopen'))) {
                                  throw new Exception('fopen_query called on system without allow_url_fopen enabled in php.ini');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 get_debug is not named in camelCase.
                      Open

                          public function get_debug()
                          {
                              return $this->debug;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 hash_auth is not named in camelCase.
                      Open

                          public function hash_auth($user, $hash)
                          {
                              $this->set_hash($hash);
                              $this->set_user($user);
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 set_http_client is not named in camelCase.
                      Open

                          public function set_http_client($client)
                          {
                              if (($client != 'curl') && ($client != 'fopen')) {
                                  throw new Exception('only curl and fopen and allowed http clients');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 get_port is not named in camelCase.
                      Open

                          public function get_port()
                          {
                              return $this->port;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 unserialize_xml is not named in camelCase.
                      Open

                          private function unserialize_xml($input, $callback = null, $recurse = false)
                          {
                              // Get input, loading an xml string with simplexml if its the top level of recursion
                              $data = ((!$recurse) && is_string($input)) ? simplexml_load_string($input) : $input;
                              // Convert SimpleXMLElements to array
                      Severity: Minor
                      Found in src/xmlapi.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 api2_query is not named in camelCase.
                      Open

                          public function api2_query($user, $module, $function, $args = [])
                          {
                              if (!isset($user) || !isset($module) || !isset($function)) {
                                  error_log("api2_query requires that a username, module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 return_xml is not named in camelCase.
                      Open

                          public function return_xml()
                          {
                              $this->set_output('xml');
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 get_protocol is not named in camelCase.
                      Open

                          public function get_protocol()
                          {
                              return $this->protocol;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 get_auth_type is not named in camelCase.
                      Open

                          public function get_auth_type()
                          {
                              return $this->auth_type;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 get_http_client is not named in camelCase.
                      Open

                          public function get_http_client()
                          {
                              return $this->http_client;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 get_host is not named in camelCase.
                      Open

                          public function get_host()
                          {
                              return $this->host;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 set_auth_type is not named in camelCase.
                      Open

                          public function set_auth_type($auth_type)
                          {
                              if ($auth_type != 'hash' && $auth_type != 'pass') {
                                  throw new Exception('the only two allowable auth types arehash and path');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 password_auth is not named in camelCase.
                      Open

                          public function password_auth($user, $pass)
                          {
                              $this->set_password($pass);
                              $this->set_user($user);
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 set_password is not named in camelCase.
                      Open

                          public function set_password($pass)
                          {
                              $this->auth_type = 'pass';
                              $this->auth = $pass;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 get_output is not named in camelCase.
                      Open

                          public function get_output()
                          {
                              return $this->output;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 set_output is not named in camelCase.
                      Open

                          public function set_output($output)
                          {
                              if ($output != 'json' && $output != 'xml' && $output != 'array' && $output != 'simplexml') {
                                  throw new Exception('json, xml, array and simplexml are the only allowed values for set_output');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 curl_query is not named in camelCase.
                      Open

                          private function curl_query($url, $postdata, $authstr)
                          {
                              $curl = curl_init();
                              curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                              // Return contents of transfer on curl_exec
                      Severity: Minor
                      Found in src/xmlapi.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 get_user is not named in camelCase.
                      Open

                          public function get_user()
                          {
                              return $this->user;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 return_object is not named in camelCase.
                      Open

                          public function return_object()
                          {
                              $this->set_output('simplexml');
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 set_host is not named in camelCase.
                      Open

                          public function set_host($host)
                          {
                              $this->host = $host;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 set_port is not named in camelCase.
                      Open

                          public function set_port($port)
                          {
                              if (!is_int($port)) {
                                  $port = intval($port);
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 set_user is not named in camelCase.
                      Open

                          public function set_user($user)
                          {
                              $this->user = $user;
                          }
                      Severity: Minor
                      Found in src/xmlapi.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 api1_query is not named in camelCase.
                      Open

                          public function api1_query($user, $module, $function, $args = [])
                          {
                              if (!isset($module) || !isset($function) || !isset($user)) {
                                  error_log("api1_query requires that a module and function are passed to it");
                      
                      
                      Severity: Minor
                      Found in src/xmlapi.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 xmlapi_query is not named in camelCase.
                      Open

                          public function xmlapi_query($function, $vars = [])
                          {
                              // Check to make sure all the data needed to perform the query is in place
                              if (!$function) {
                                  throw new Exception('xmlapi_query() requires a function to be passed to it');
                      Severity: Minor
                      Found in src/xmlapi.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 set_protocol is not named in camelCase.
                      Open

                          public function set_protocol($proto)
                          {
                              if ($proto != 'https' && $proto != 'http') {
                                  throw new Exception('https and http are the only protocols that can be passed to set_protocol');
                              }
                      Severity: Minor
                      Found in src/xmlapi.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 set_hash is not named in camelCase.
                      Open

                          public function set_hash($hash)
                          {
                              $this->auth_type = 'hash';
                              $this->auth = preg_replace("/(\n|\r|\s)/", '', $hash);
                          }
                      Severity: Minor
                      Found in src/xmlapi.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