amtgard/ORK3

View on GitHub
system/lib/nusoap/nusoap.php

Summary

Maintainability
F
1 yr
Test Coverage

File nusoap.php has 5359 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/*
$Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $

Severity: Major
Found in system/lib/nusoap/nusoap.php - About 2 wks to fix

    Function getResponse has a Cognitive Complexity of 201 (exceeds 5 allowed). Consider refactoring.
    Open

        function getResponse(){
            $this->incoming_payload = '';
            
          if ($this->io_method() == 'socket') {
            // loop until headers have been retrieved
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 4 days 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 serializeType has a Cognitive Complexity of 197 (exceeds 5 allowed). Consider refactoring.
    Open

        function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false)
        {
            $this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified"));
            $this->appendDebug("value=" . $this->varDump($value));
            if($use == 'encoded' && $encodingStyle) {
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 4 days 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 connect has a Cognitive Complexity of 153 (exceeds 5 allowed). Consider refactoring.
    Open

        function connect($connection_timeout=0,$response_timeout=30){
              // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like
              // "regular" socket.
              // TODO: disabled for now because OpenSSL must be *compiled* in (not just
              //       loaded), and until PHP5 stream_get_wrappers is not available.
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 3 days 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 serialize_val has a Cognitive Complexity of 128 (exceeds 5 allowed). Consider refactoring.
    Open

        function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded',$soapval=false) {
            $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval");
            $this->appendDebug('value=' . $this->varDump($val));
            $this->appendDebug('attributes=' . $this->varDump($attributes));
            
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 2 days 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 schemaStartElement has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
    Open

        function schemaStartElement($parser, $name, $attrs) {
            
            // position in the total number of elements, starting from 0
            $pos = $this->position++;
            $depth = $this->depth++;
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 2 days 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 serialize has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
    Open

        function serialize($debug = 0)
        {
            $xml = '<?xml version="1.0" encoding="ISO-8859-1"?>';
            $xml .= "\n<definitions";
            foreach($this->namespaces as $k => $v) {
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 1 day 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 start_element has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
    Open

        function start_element($parser, $name, $attrs)
        {
            if ($this->status == 'schema') {
                $this->currentSchema->schemaStartElement($parser, $name, $attrs);
                $this->appendDebug($this->currentSchema->getDebug());
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 1 day 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 fetchWSDL has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
    Open

        function fetchWSDL($wsdl) {
            $this->debug("parse and process WSDL path=$wsdl");
            $this->wsdl = $wsdl;
            // parse wsdl file
            if ($this->wsdl != "") {
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 1 day 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 serializeSchema has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
    Open

        function serializeSchema(){
    
            $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion);
            $xml = '';
            // imports
    Severity: Minor
    Found in system/lib/nusoap/nusoap.php - About 1 day 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 getResponse has 298 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function getResponse(){
            $this->incoming_payload = '';
            
          if ($this->io_method() == 'socket') {
            // loop until headers have been retrieved
    Severity: Major
    Found in system/lib/nusoap/nusoap.php - About 1 day to fix

      Function serializeComplexTypeElements has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
      Open

          function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) {
              $this->debug("in serializeComplexTypeElements for XML Schema type $ns:$uqType");
              $xml = '';
              if (isset($typeDef['extensionBase'])) {
                  $nsx = $this->getPrefix($typeDef['extensionBase']);
      Severity: Minor
      Found in system/lib/nusoap/nusoap.php - About 1 day 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 serializeType has 284 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false)
          {
              $this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified"));
              $this->appendDebug("value=" . $this->varDump($value));
              if($use == 'encoded' && $encodingStyle) {
      Severity: Major
      Found in system/lib/nusoap/nusoap.php - About 1 day to fix

        Function buildVal has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
        Open

            function buildVal($pos){
                if(!isset($this->message[$pos]['type'])){
                    $this->message[$pos]['type'] = '';
                }
                $this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']);
        Severity: Minor
        Found in system/lib/nusoap/nusoap.php - About 1 day 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 parse_http_headers has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
        Open

            function parse_http_headers() {
                global $HTTP_SERVER_VARS;
        
                $this->request = '';
                $this->SOAPAction = '';
        Severity: Minor
        Found in system/lib/nusoap/nusoap.php - About 1 day 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 schemaStartElement has 266 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function schemaStartElement($parser, $name, $attrs) {
                
                // position in the total number of elements, starting from 0
                $pos = $this->position++;
                $depth = $this->depth++;
        Severity: Major
        Found in system/lib/nusoap/nusoap.php - About 1 day to fix

          Function call has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
          Open

              function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){
                  $this->operation = $operation;
                  $this->fault = false;
                  $this->setError('');
                  $this->request = '';
          Severity: Minor
          Found in system/lib/nusoap/nusoap.php - About 1 day 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 start_element has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
          Open

              function start_element($parser, $name, $attrs) {
                  // position in a total number of elements, starting from 0
                  // update class level pos
                  $pos = $this->position++;
                  // and set mine
          Severity: Minor
          Found in system/lib/nusoap/nusoap.php - About 1 day 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 serialize_val has 233 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded',$soapval=false) {
                  $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval");
                  $this->appendDebug('value=' . $this->varDump($val));
                  $this->appendDebug('attributes=' . $this->varDump($attributes));
                  
          Severity: Major
          Found in system/lib/nusoap/nusoap.php - About 1 day to fix

            Function invoke_method has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
            Open

                function invoke_method() {
                    $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction);
            
                    //
                    // if you are debugging in this area of the code, your service uses a class to implement methods,
            Severity: Minor
            Found in system/lib/nusoap/nusoap.php - About 7 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 start_element has 181 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function start_element($parser, $name, $attrs)
                {
                    if ($this->status == 'schema') {
                        $this->currentSchema->schemaStartElement($parser, $name, $attrs);
                        $this->appendDebug($this->currentSchema->getDebug());
            Severity: Major
            Found in system/lib/nusoap/nusoap.php - About 7 hrs to fix

              Function end_element has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
              Open

                  function end_element($parser, $name) {
                      // position of current element is equal to the last value left in depth_array for my depth
                      $pos = $this->depth_array[$this->depth--];
              
                      // get element prefix
              Severity: Minor
              Found in system/lib/nusoap/nusoap.php - About 6 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 connect has 172 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function connect($connection_timeout=0,$response_timeout=30){
                        // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like
                        // "regular" socket.
                        // TODO: disabled for now because OpenSSL must be *compiled* in (not just
                        //       loaded), and until PHP5 stream_get_wrappers is not available.
              Severity: Major
              Found in system/lib/nusoap/nusoap.php - About 6 hrs to fix

                Function nusoap_parser has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                Open

                    function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
                        parent::nusoap_base();
                        $this->xml = $xml;
                        $this->xml_encoding = $encoding;
                        $this->method = $method;
                Severity: Minor
                Found in system/lib/nusoap/nusoap.php - About 6 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 getTypeDef has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                Open

                    function getTypeDef($type, $ns) {
                        $this->debug("in getTypeDef: type=$type, ns=$ns");
                        if ((! $ns) && isset($this->namespaces['tns'])) {
                            $ns = $this->namespaces['tns'];
                            $this->debug("in getTypeDef: type namespace forced to $ns");
                Severity: Minor
                Found in system/lib/nusoap/nusoap.php - About 6 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 serialize_return has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                Open

                    function serialize_return() {
                        $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI);
                        // if fault
                        if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
                            $this->debug('got a fault object from method');
                Severity: Minor
                Found in system/lib/nusoap/nusoap.php - About 6 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 serializeRPCParameters has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                Open

                    function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') {
                        $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType");
                        $this->appendDebug('parameters=' . $this->varDump($parameters));
                        
                        if ($direction != 'input' && $direction != 'output') {
                Severity: Minor
                Found in system/lib/nusoap/nusoap.php - About 6 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 call has 152 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){
                        $this->operation = $operation;
                        $this->fault = false;
                        $this->setError('');
                        $this->request = '';
                Severity: Major
                Found in system/lib/nusoap/nusoap.php - About 6 hrs to fix

                  Function getTypeDef has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function getTypeDef($type){
                          //$this->debug("in getTypeDef for type $type");
                          if (substr($type, -1) == '^') {
                              $is_element = 1;
                              $type = substr($type, 0, -1);
                  Severity: Minor
                  Found in system/lib/nusoap/nusoap.php - About 5 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 UpdateCookies has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function UpdateCookies($cookies) {
                          if (sizeof($this->cookies) == 0) {
                              // no existing cookies: take whatever is new
                              if (sizeof($cookies) > 0) {
                                  $this->debug('Setting new cookie(s)');
                  Severity: Minor
                  Found in system/lib/nusoap/nusoap.php - About 5 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 getCookiesForRequest has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function getCookiesForRequest($cookies, $secure=false) {
                          $cookie_str = '';
                          if ((! is_null($cookies)) && (is_array($cookies))) {
                              foreach ($cookies as $cookie) {
                                  if (! is_array($cookie)) {
                  Severity: Minor
                  Found in system/lib/nusoap/nusoap.php - About 5 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 send_response has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function send_response() {
                          $this->debug('Enter send_response');
                          if ($this->fault) {
                              $payload = $this->fault->serialize();
                              $this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error";
                  Severity: Minor
                  Found in system/lib/nusoap/nusoap.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

                  Method serialize has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function serialize($debug = 0)
                      {
                          $xml = '<?xml version="1.0" encoding="ISO-8859-1"?>';
                          $xml .= "\n<definitions";
                          foreach($this->namespaces as $k => $v) {
                  Severity: Major
                  Found in system/lib/nusoap/nusoap.php - About 4 hrs to fix

                    Method invoke_method has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function invoke_method() {
                            $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction);
                    
                            //
                            // if you are debugging in this area of the code, your service uses a class to implement methods,
                    Severity: Major
                    Found in system/lib/nusoap/nusoap.php - About 4 hrs to fix

                      Method webDescription has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function webDescription(){
                              global $HTTP_SERVER_VARS;
                      
                              if (isset($_SERVER)) {
                                  $PHP_SELF = $_SERVER['PHP_SELF'];
                      Severity: Major
                      Found in system/lib/nusoap/nusoap.php - About 4 hrs to fix

                        Function service has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                        Open

                            function service($data){
                                global $HTTP_SERVER_VARS;
                        
                                if (isset($_SERVER['REQUEST_METHOD'])) {
                                    $rm = $_SERVER['REQUEST_METHOD'];
                        Severity: Minor
                        Found in system/lib/nusoap/nusoap.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

                        Method start_element has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function start_element($parser, $name, $attrs) {
                                // position in a total number of elements, starting from 0
                                // update class level pos
                                $pos = $this->position++;
                                // and set mine
                        Severity: Major
                        Found in system/lib/nusoap/nusoap.php - About 4 hrs to fix

                          Function webDescription has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                          Open

                              function webDescription(){
                                  global $HTTP_SERVER_VARS;
                          
                                  if (isset($_SERVER)) {
                                      $PHP_SELF = $_SERVER['PHP_SELF'];
                          Severity: Minor
                          Found in system/lib/nusoap/nusoap.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 serializeSchema has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function serializeSchema(){
                          
                                  $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion);
                                  $xml = '';
                                  // imports
                          Severity: Major
                          Found in system/lib/nusoap/nusoap.php - About 3 hrs to fix

                            Method buildVal has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function buildVal($pos){
                                    if(!isset($this->message[$pos]['type'])){
                                        $this->message[$pos]['type'] = '';
                                    }
                                    $this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']);
                            Severity: Major
                            Found in system/lib/nusoap/nusoap.php - About 3 hrs to fix

                              nusoap_client has 30 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class nusoap_client extends nusoap_base  {
                              
                                  var $username = '';                // Username for HTTP authentication
                                  var $password = '';                // Password for HTTP authentication
                                  var $authtype = '';                // Type of HTTP authentication
                              Severity: Minor
                              Found in system/lib/nusoap/nusoap.php - About 3 hrs to fix

                                Method parse_http_headers has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function parse_http_headers() {
                                        global $HTTP_SERVER_VARS;
                                
                                        $this->request = '';
                                        $this->SOAPAction = '';
                                Severity: Major
                                Found in system/lib/nusoap/nusoap.php - About 3 hrs to fix

                                  Function sendRequest has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      function sendRequest($data, $cookies = NULL) {
                                          // build cookie string
                                          $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https')));
                                  
                                          // build payload
                                  Severity: Minor
                                  Found in system/lib/nusoap/nusoap.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 fetchWSDL has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function fetchWSDL($wsdl) {
                                          $this->debug("parse and process WSDL path=$wsdl");
                                          $this->wsdl = $wsdl;
                                          // parse wsdl file
                                          if ($this->wsdl != "") {
                                  Severity: Major
                                  Found in system/lib/nusoap/nusoap.php - About 3 hrs to fix

                                    Function serializeComplexTypeAttributes has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) {
                                            $this->debug("serializeComplexTypeAttributes for XML Schema type $ns:$uqType");
                                            $xml = '';
                                            if (isset($typeDef['extensionBase'])) {
                                                $nsx = $this->getPrefix($typeDef['extensionBase']);
                                    Severity: Minor
                                    Found in system/lib/nusoap/nusoap.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 parseWSDL has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        function parseWSDL($wsdl = '') {
                                            $this->debug("parse WSDL at path=$wsdl");
                                    
                                            if ($wsdl == '') {
                                                $this->debug('no wsdl passed to parseWSDL()!!');
                                    Severity: Minor
                                    Found in system/lib/nusoap/nusoap.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 nusoap_server has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        function nusoap_server($wsdl=false){
                                            parent::nusoap_base();
                                            // turn on debugging?
                                            global $debug;
                                            global $HTTP_SERVER_VARS;
                                    Severity: Minor
                                    Found in system/lib/nusoap/nusoap.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 serializeComplexTypeElements has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) {
                                            $this->debug("in serializeComplexTypeElements for XML Schema type $ns:$uqType");
                                            $xml = '';
                                            if (isset($typeDef['extensionBase'])) {
                                                $nsx = $this->getPrefix($typeDef['extensionBase']);
                                    Severity: Major
                                    Found in system/lib/nusoap/nusoap.php - About 3 hrs to fix

                                      Function serializeParameters has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          function serializeParameters($operation, $direction, $parameters)
                                          {
                                              $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); 
                                              $this->appendDebug('parameters=' . $this->varDump($parameters));
                                              
                                      Severity: Minor
                                      Found in system/lib/nusoap/nusoap.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 serialize_return has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function serialize_return() {
                                              $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI);
                                              // if fault
                                              if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
                                                  $this->debug('got a fault object from method');
                                      Severity: Major
                                      Found in system/lib/nusoap/nusoap.php - About 3 hrs to fix

                                        nusoap_base has 26 functions (exceeds 20 allowed). Consider refactoring.
                                        Open

                                        class nusoap_base {
                                            /**
                                             * Identification for HTTP headers.
                                             *
                                             * @var string
                                        Severity: Minor
                                        Found in system/lib/nusoap/nusoap.php - About 3 hrs to fix

                                          Method parseWSDL has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              function parseWSDL($wsdl = '') {
                                                  $this->debug("parse WSDL at path=$wsdl");
                                          
                                                  if ($wsdl == '') {
                                                      $this->debug('no wsdl passed to parseWSDL()!!');
                                          Severity: Major
                                          Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                            Function addOperation has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                                function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){
                                                    if ($use == 'encoded' && $encodingStyle == '') {
                                                        $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
                                                    }
                                            
                                            
                                            Severity: Minor
                                            Found in system/lib/nusoap/nusoap.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 serializeRPCParameters has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') {
                                                    $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType");
                                                    $this->appendDebug('parameters=' . $this->varDump($parameters));
                                                    
                                                    if ($direction != 'input' && $direction != 'output') {
                                            Severity: Major
                                            Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                              Function send has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) {
                                                      $this->checkCookies();
                                                      // detect transport
                                                      switch(true){
                                                          // http(s)
                                              Severity: Minor
                                              Found in system/lib/nusoap/nusoap.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 nusoap_parser has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
                                                      parent::nusoap_base();
                                                      $this->xml = $xml;
                                                      $this->xml_encoding = $encoding;
                                                      $this->method = $method;
                                              Severity: Major
                                              Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

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

                                                class wsdl extends nusoap_base {
                                                    // URL or filename of the root of this WSDL
                                                    var $wsdl; 
                                                    // define internal arrays of bindings, ports, operations, messages, etc.
                                                    var $schemas = array();
                                                Severity: Minor
                                                Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                  Method service has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      function service($data){
                                                          global $HTTP_SERVER_VARS;
                                                  
                                                          if (isset($_SERVER['REQUEST_METHOD'])) {
                                                              $rm = $_SERVER['REQUEST_METHOD'];
                                                  Severity: Major
                                                  Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                    Method addOperation has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){
                                                            if ($use == 'encoded' && $encodingStyle == '') {
                                                                $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
                                                            }
                                                    
                                                    
                                                    Severity: Major
                                                    Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                      Method end_element has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          function end_element($parser, $name) {
                                                              // position of current element is equal to the last value left in depth_array for my depth
                                                              $pos = $this->depth_array[$this->depth--];
                                                      
                                                              // get element prefix
                                                      Severity: Major
                                                      Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                        Function register has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                            function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){
                                                                global $HTTP_SERVER_VARS;
                                                        
                                                                if($this->externalWSDLURL){
                                                                    die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.');
                                                        Severity: Minor
                                                        Found in system/lib/nusoap/nusoap.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 getTypeDef has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            function getTypeDef($type){
                                                                //$this->debug("in getTypeDef for type $type");
                                                                if (substr($type, -1) == '^') {
                                                                    $is_element = 1;
                                                                    $type = substr($type, 0, -1);
                                                        Severity: Major
                                                        Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                          Method configureWSDL has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false)
                                                              {
                                                                  global $HTTP_SERVER_VARS;
                                                          
                                                                  if (isset($_SERVER)) {
                                                          Severity: Major
                                                          Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                            soap_transport_http has 22 functions (exceeds 20 allowed). Consider refactoring.
                                                            Open

                                                            class soap_transport_http extends nusoap_base {
                                                            
                                                                var $url = '';
                                                                var $uri = '';
                                                                var $digest_uri = '';
                                                            Severity: Minor
                                                            Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                              Function parametersMatchWrapped has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  function parametersMatchWrapped($type, &$parameters) {
                                                                      $this->debug("in parametersMatchWrapped type=$type, parameters=");
                                                                      $this->appendDebug($this->varDump($parameters));
                                                              
                                                                      // split type into namespace:unqualified-type
                                                              Severity: Minor
                                                              Found in system/lib/nusoap/nusoap.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 send has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) {
                                                                      $this->checkCookies();
                                                                      // detect transport
                                                                      switch(true){
                                                                          // http(s)
                                                              Severity: Major
                                                              Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                                Method register has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){
                                                                        global $HTTP_SERVER_VARS;
                                                                
                                                                        if($this->externalWSDLURL){
                                                                            die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.');
                                                                Severity: Major
                                                                Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                                  Method serializeParameters has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                      function serializeParameters($operation, $direction, $parameters)
                                                                      {
                                                                          $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); 
                                                                          $this->appendDebug('parameters=' . $this->varDump($parameters));
                                                                          
                                                                  Severity: Major
                                                                  Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

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

                                                                        function parse_request($data='') {
                                                                            $this->debug('entering parse_request()');
                                                                            $this->parse_http_headers();
                                                                            $this->debug('got character encoding: '.$this->xml_encoding);
                                                                            // uncompress if necessary
                                                                    Severity: Minor
                                                                    Found in system/lib/nusoap/nusoap.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 _getProxyClassCode has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                        function _getProxyClassCode($r) {
                                                                            $this->debug("in getProxy endpointType=$this->endpointType");
                                                                            $this->appendDebug("wsdl=" . $this->varDump($this->wsdl));
                                                                            if ($this->endpointType != 'wsdl') {
                                                                                $evalStr = 'A proxy can only be created for a WSDL client';
                                                                    Severity: Minor
                                                                    Found in system/lib/nusoap/nusoap.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 send_response has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                        function send_response() {
                                                                            $this->debug('Enter send_response');
                                                                            if ($this->fault) {
                                                                                $payload = $this->fault->serialize();
                                                                                $this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error";
                                                                    Severity: Major
                                                                    Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                                      Method getTypeDef has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                          function getTypeDef($type, $ns) {
                                                                              $this->debug("in getTypeDef: type=$type, ns=$ns");
                                                                              if ((! $ns) && isset($this->namespaces['tns'])) {
                                                                                  $ns = $this->namespaces['tns'];
                                                                                  $this->debug("in getTypeDef: type namespace forced to $ns");
                                                                      Severity: Major
                                                                      Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                                        Method parametersMatchWrapped has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            function parametersMatchWrapped($type, &$parameters) {
                                                                                $this->debug("in parametersMatchWrapped type=$type, parameters=");
                                                                                $this->appendDebug($this->varDump($parameters));
                                                                        
                                                                                // split type into namespace:unqualified-type
                                                                        Severity: Major
                                                                        Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

                                                                          Method UpdateCookies has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                              function UpdateCookies($cookies) {
                                                                                  if (sizeof($this->cookies) == 0) {
                                                                                      // no existing cookies: take whatever is new
                                                                                      if (sizeof($cookies) > 0) {
                                                                                          $this->debug('Setting new cookie(s)');
                                                                          Severity: Major
                                                                          Found in system/lib/nusoap/nusoap.php - About 2 hrs to fix

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

                                                                                function _getProxyClassCode($r) {
                                                                                    $this->debug("in getProxy endpointType=$this->endpointType");
                                                                                    $this->appendDebug("wsdl=" . $this->varDump($this->wsdl));
                                                                                    if ($this->endpointType != 'wsdl') {
                                                                                        $evalStr = 'A proxy can only be created for a WSDL client';
                                                                            Severity: Minor
                                                                            Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

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

                                                                                  function nusoap_server($wsdl=false){
                                                                                      parent::nusoap_base();
                                                                                      // turn on debugging?
                                                                                      global $debug;
                                                                                      global $HTTP_SERVER_VARS;
                                                                              Severity: Minor
                                                                              Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                Method serializeComplexTypeAttributes has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                    function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) {
                                                                                        $this->debug("serializeComplexTypeAttributes for XML Schema type $ns:$uqType");
                                                                                        $xml = '';
                                                                                        if (isset($typeDef['extensionBase'])) {
                                                                                            $nsx = $this->getPrefix($typeDef['extensionBase']);
                                                                                Severity: Minor
                                                                                Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                  Function configureWSDL has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                                                                  Open

                                                                                      function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false)
                                                                                      {
                                                                                          global $HTTP_SERVER_VARS;
                                                                                  
                                                                                          if (isset($_SERVER)) {
                                                                                  Severity: Minor
                                                                                  Found in system/lib/nusoap/nusoap.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 getOperations has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                                                                  Open

                                                                                      function getOperations($portName = '', $bindingType = 'soap') {
                                                                                          $ops = array();
                                                                                          if ($bindingType == 'soap') {
                                                                                              $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
                                                                                          } elseif ($bindingType == 'soap12') {
                                                                                  Severity: Minor
                                                                                  Found in system/lib/nusoap/nusoap.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 parseCookie has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                      function parseCookie($cookie_str) {
                                                                                          $cookie_str = str_replace('; ', ';', $cookie_str) . ';';
                                                                                          $data = preg_split('/;/', $cookie_str);
                                                                                          $value_str = $data[0];
                                                                                  
                                                                                  
                                                                                  Severity: Minor
                                                                                  Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                    Function serializeEnvelope has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){
                                                                                        // TODO: add an option to automatically run utf8_encode on $body and $headers
                                                                                        // if $this->soap_defencoding is UTF-8.  Not doing this automatically allows
                                                                                        // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1
                                                                                    
                                                                                    
                                                                                    Severity: Minor
                                                                                    Found in system/lib/nusoap/nusoap.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 setCredentials has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) {
                                                                                            $this->debug("setCredentials username=$username authtype=$authtype digestRequest=");
                                                                                            $this->appendDebug($this->varDump($digestRequest));
                                                                                            $this->debug("certRequest=");
                                                                                            $this->appendDebug($this->varDump($certRequest));
                                                                                    Severity: Minor
                                                                                    Found in system/lib/nusoap/nusoap.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 serializeTypeDef has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        function serializeTypeDef($type){
                                                                                            //print "in sTD() for type $type<br>";
                                                                                        if($typeDef = $this->getTypeDef($type)){
                                                                                            $str .= '<'.$type;
                                                                                            if(is_array($typeDef['attrs'])){
                                                                                    Severity: Minor
                                                                                    Found in system/lib/nusoap/nusoap.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 checkCookies has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        function checkCookies() {
                                                                                            if (sizeof($this->cookies) == 0) {
                                                                                                return true;
                                                                                            }
                                                                                            $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies');
                                                                                    Severity: Minor
                                                                                    Found in system/lib/nusoap/nusoap.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 setCredentials has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                        function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) {
                                                                                            $this->debug("setCredentials username=$username authtype=$authtype digestRequest=");
                                                                                            $this->appendDebug($this->varDump($digestRequest));
                                                                                            $this->debug("certRequest=");
                                                                                            $this->appendDebug($this->varDump($certRequest));
                                                                                    Severity: Minor
                                                                                    Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                      Method parseRequest has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                          function parseRequest($headers, $data) {
                                                                                              $this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' headers:');
                                                                                              $this->appendDebug($this->varDump($headers));
                                                                                              if (!isset($headers['content-type'])) {
                                                                                                  $this->setError('Request not of type text/xml (no content-type header)');
                                                                                      Severity: Minor
                                                                                      Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                        Method parseResponse has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                            function parseResponse($headers, $data) {
                                                                                                $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:');
                                                                                                $this->appendDebug($this->varDump($headers));
                                                                                                if (!isset($headers['content-type'])) {
                                                                                                    $this->setError('Response not of type text/xml (no content-type header)');
                                                                                        Severity: Minor
                                                                                        Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                          Method getCookiesForRequest has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                              function getCookiesForRequest($cookies, $secure=false) {
                                                                                                  $cookie_str = '';
                                                                                                  if ((! is_null($cookies)) && (is_array($cookies))) {
                                                                                                      foreach ($cookies as $cookie) {
                                                                                                          if (! is_array($cookie)) {
                                                                                          Severity: Minor
                                                                                          Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                            Method sendRequest has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                function sendRequest($data, $cookies = NULL) {
                                                                                                    // build cookie string
                                                                                                    $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https')));
                                                                                            
                                                                                                    // build payload
                                                                                            Severity: Minor
                                                                                            Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

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

                                                                                                  function typeToForm($name,$type){
                                                                                                      // get typedef
                                                                                                      if($typeDef = $this->getTypeDef($type)){
                                                                                                          // if struct
                                                                                                          if($typeDef['phpType'] == 'struct'){
                                                                                              Severity: Minor
                                                                                              Found in system/lib/nusoap/nusoap.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 addComplexType has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') {
                                                                                                      if (count($elements) > 0) {
                                                                                                          $eElements = array();
                                                                                                          foreach($elements as $n => $e){
                                                                                                              // expand each element
                                                                                              Severity: Minor
                                                                                              Found in system/lib/nusoap/nusoap.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 getOperationData has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  function getOperationData($operation, $bindingType = 'soap')
                                                                                                  {
                                                                                                      if ($bindingType == 'soap') {
                                                                                                          $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
                                                                                                      } elseif ($bindingType == 'soap12') {
                                                                                              Severity: Minor
                                                                                              Found in system/lib/nusoap/nusoap.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 getOperationDataForSoapAction has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') {
                                                                                                      if ($bindingType == 'soap') {
                                                                                                          $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
                                                                                                      } elseif ($bindingType == 'soap12') {
                                                                                                          $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/';
                                                                                              Severity: Minor
                                                                                              Found in system/lib/nusoap/nusoap.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 serializeEnvelope has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){
                                                                                                  // TODO: add an option to automatically run utf8_encode on $body and $headers
                                                                                                  // if $this->soap_defencoding is UTF-8.  Not doing this automatically allows
                                                                                                  // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1
                                                                                              
                                                                                              
                                                                                              Severity: Minor
                                                                                              Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                Method getProxy has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                    function getProxy() {
                                                                                                        $r = rand();
                                                                                                        $evalStr = $this->_getProxyClassCode($r);
                                                                                                        //$this->debug("proxy class: $evalStr");
                                                                                                        if ($this->getError()) {
                                                                                                Severity: Minor
                                                                                                Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

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

                                                                                                      function decodeChunked($buffer, $lb){
                                                                                                          // length := 0
                                                                                                          $length = 0;
                                                                                                          $new = '';
                                                                                                          
                                                                                                  Severity: Minor
                                                                                                  Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

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

                                                                                                        function decodeSimple($value, $type, $typens) {
                                                                                                            // TODO: use the namespace!
                                                                                                            if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') {
                                                                                                                return (string) $value;
                                                                                                            }
                                                                                                    Severity: Minor
                                                                                                    Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                      Method addOperation has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                          function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){
                                                                                                      Severity: Major
                                                                                                      Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                        Method wsdl has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                            function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){
                                                                                                        Severity: Major
                                                                                                        Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                          Method register has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                              function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){
                                                                                                          Severity: Major
                                                                                                          Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                            Method nusoap_client has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
                                                                                                            Severity: Major
                                                                                                            Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                              Method timestamp_to_iso8601 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                              function timestamp_to_iso8601($timestamp,$utc=true){
                                                                                                                  $datestr = date('Y-m-d\TH:i:sO',$timestamp);
                                                                                                                  $pos = strrpos($datestr, "+");
                                                                                                                  if ($pos === FALSE) {
                                                                                                                      $pos = strrpos($datestr, "-");
                                                                                                              Severity: Minor
                                                                                                              Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                Method addComplexType has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                    function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') {
                                                                                                                        if (count($elements) > 0) {
                                                                                                                            $eElements = array();
                                                                                                                            foreach($elements as $n => $e){
                                                                                                                                // expand each element
                                                                                                                Severity: Minor
                                                                                                                Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                  Method nusoap_client has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
                                                                                                                          parent::nusoap_base();
                                                                                                                          $this->endpoint = $endpoint;
                                                                                                                          $this->proxyhost = $proxyhost;
                                                                                                                          $this->proxyport = $proxyport;
                                                                                                                  Severity: Minor
                                                                                                                  Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                    Function setURL has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        function setURL($url) {
                                                                                                                            $this->url = $url;
                                                                                                                    
                                                                                                                            $u = parse_url($url);
                                                                                                                            foreach($u as $k => $v){
                                                                                                                    Severity: Minor
                                                                                                                    Found in system/lib/nusoap/nusoap.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 send has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) {
                                                                                                                            
                                                                                                                            $this->debug('entered send() with data of length: '.strlen($data));
                                                                                                                    
                                                                                                                            $this->tryagain = true;
                                                                                                                    Severity: Minor
                                                                                                                    Found in system/lib/nusoap/nusoap.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 decodeSimple has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        function decodeSimple($value, $type, $typens) {
                                                                                                                            // TODO: use the namespace!
                                                                                                                            if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') {
                                                                                                                                return (string) $value;
                                                                                                                            }
                                                                                                                    Severity: Minor
                                                                                                                    Found in system/lib/nusoap/nusoap.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 iso8601_to_timestamp has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                    function iso8601_to_timestamp($datestr){
                                                                                                                        $pattern = '/'.
                                                                                                                        '([0-9]{4})-'.    // centuries & years CCYY-
                                                                                                                        '([0-9]{2})-'.    // months MM-
                                                                                                                        '([0-9]{2})'.    // days DD
                                                                                                                    Severity: Minor
                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

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

                                                                                                                          function setURL($url) {
                                                                                                                              $this->url = $url;
                                                                                                                      
                                                                                                                              $u = parse_url($url);
                                                                                                                              foreach($u as $k => $v){
                                                                                                                      Severity: Minor
                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                        Method addComplexType has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                            function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){
                                                                                                                        Severity: Major
                                                                                                                        Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                          Method addComplexType has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                              function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') {
                                                                                                                          Severity: Major
                                                                                                                          Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                            Method serialize_val has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded',$soapval=false) {
                                                                                                                            Severity: Major
                                                                                                                            Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                              Open

                                                                                                                                      if ($this->use_curl || ($this->scheme == 'https') || ($this->scheme == 'http' && $this->authtype == 'ntlm') || ($this->scheme == 'http' && is_array($this->proxy) && $this->proxy['authtype'] == 'ntlm'))
                                                                                                                                          return 'curl';
                                                                                                                              Severity: Major
                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                Open

                                                                                                                                        if ($type == 'nonPositiveInteger' || $type == 'negativeInteger'
                                                                                                                                            || $type == 'nonNegativeInteger' || $type == 'positiveInteger'
                                                                                                                                            || $type == 'unsignedInt'
                                                                                                                                            || $type == 'unsignedShort' || $type == 'unsignedByte') {
                                                                                                                                            return (int) $value;
                                                                                                                                Severity: Major
                                                                                                                                Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                                  Method call has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                      function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){
                                                                                                                                  Severity: Major
                                                                                                                                  Found in system/lib/nusoap/nusoap.php - About 1 hr to fix

                                                                                                                                    Function io_method has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        function io_method() {
                                                                                                                                            if ($this->use_curl || ($this->scheme == 'https') || ($this->scheme == 'http' && $this->authtype == 'ntlm') || ($this->scheme == 'http' && is_array($this->proxy) && $this->proxy['authtype'] == 'ntlm'))
                                                                                                                                                return 'curl';
                                                                                                                                            if (($this->scheme == 'http' || $this->scheme == 'ssl') && $this->authtype != 'ntlm' && (!is_array($this->proxy) || $this->proxy['authtype'] != 'ntlm'))
                                                                                                                                                return 'socket';
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 55 mins to fix

                                                                                                                                    Cognitive Complexity

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

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

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

                                                                                                                                    Further reading

                                                                                                                                    Function parseRequest has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        function parseRequest($headers, $data) {
                                                                                                                                            $this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' headers:');
                                                                                                                                            $this->appendDebug($this->varDump($headers));
                                                                                                                                            if (!isset($headers['content-type'])) {
                                                                                                                                                $this->setError('Request not of type text/xml (no content-type header)');
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 55 mins to fix

                                                                                                                                    Cognitive Complexity

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

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

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

                                                                                                                                    Further reading

                                                                                                                                    Function parseResponse has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        function parseResponse($headers, $data) {
                                                                                                                                            $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:');
                                                                                                                                            $this->appendDebug($this->varDump($headers));
                                                                                                                                            if (!isset($headers['content-type'])) {
                                                                                                                                                $this->setError('Response not of type text/xml (no content-type header)');
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 55 mins to fix

                                                                                                                                    Cognitive Complexity

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

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

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

                                                                                                                                    Further reading

                                                                                                                                    Function parseCookie has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        function parseCookie($cookie_str) {
                                                                                                                                            $cookie_str = str_replace('; ', ';', $cookie_str) . ';';
                                                                                                                                            $data = preg_split('/;/', $cookie_str);
                                                                                                                                            $value_str = $data[0];
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 55 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

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

                                                                                                                                          function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) {
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 45 mins to fix

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

                                                                                                                                          function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false)
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 45 mins to fix

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

                                                                                                                                            function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false)
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in system/lib/nusoap/nusoap.php - About 45 mins to fix

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

                                                                                                                                              function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) {
                                                                                                                                          Severity: Minor
                                                                                                                                          Found in system/lib/nusoap/nusoap.php - About 45 mins to fix

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

                                                                                                                                                function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){
                                                                                                                                            Severity: Minor
                                                                                                                                            Found in system/lib/nusoap/nusoap.php - About 45 mins to fix

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

                                                                                                                                              function timestamp_to_iso8601($timestamp,$utc=true){
                                                                                                                                                  $datestr = date('Y-m-d\TH:i:sO',$timestamp);
                                                                                                                                                  $pos = strrpos($datestr, "+");
                                                                                                                                                  if ($pos === FALSE) {
                                                                                                                                                      $pos = strrpos($datestr, "-");
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 45 mins to fix

                                                                                                                                              Cognitive Complexity

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

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

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

                                                                                                                                              Further reading

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

                                                                                                                                                  function decodeChunked($buffer, $lb){
                                                                                                                                                      // length := 0
                                                                                                                                                      $length = 0;
                                                                                                                                                      $new = '';
                                                                                                                                                      
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 45 mins to fix

                                                                                                                                              Cognitive Complexity

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

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

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

                                                                                                                                              Further reading

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

                                                                                                                                              function iso8601_to_timestamp($datestr){
                                                                                                                                                  $pattern = '/'.
                                                                                                                                                  '([0-9]{4})-'.    // centuries & years CCYY-
                                                                                                                                                  '([0-9]{2})-'.    // months MM-
                                                                                                                                                  '([0-9]{2})'.    // days DD
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 45 mins to fix

                                                                                                                                              Cognitive Complexity

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

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

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

                                                                                                                                              Further reading

                                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                                              Open

                                                                                                                                                                      if (is_null($v) && isset($attrs['minOccurs']) && $attrs['minOccurs'] == '0') {
                                                                                                                                                                          // do nothing
                                                                                                                                                                      } elseif (is_null($v) && isset($attrs['nillable']) && $attrs['nillable'] == 'true') {
                                                                                                                                                                          // TODO: serialize a nil correctly, but for now serialize schema-defined type
                                                                                                                                                                          $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified);
                                                                                                                                              Severity: Major
                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 40 mins to fix

                                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                                Open

                                                                                                                                                        if (
                                                                                                                                                            ($http_status >= 300 && $http_status <= 307) ||
                                                                                                                                                            ($http_status >= 400 && $http_status <= 417) ||
                                                                                                                                                            ($http_status >= 501 && $http_status <= 505)
                                                                                                                                                           ) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in system/lib/nusoap/nusoap.php - About 40 mins to fix

                                                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                                                  Open

                                                                                                                                                                      if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') {
                                                                                                                                                                          $vv = $v;
                                                                                                                                                                          foreach ($vv as $k => $v) {
                                                                                                                                                                              if (isset($attrs['type']) || isset($attrs['ref'])) {
                                                                                                                                                                                  // serialize schema-defined type
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in system/lib/nusoap/nusoap.php - About 40 mins to fix

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

                                                                                                                                                        function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 'basic') {
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 35 mins to fix

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

                                                                                                                                                          function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) {
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 35 mins to fix

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

                                                                                                                                                            function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) {
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in system/lib/nusoap/nusoap.php - About 35 mins to fix

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

                                                                                                                                                              function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) {
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in system/lib/nusoap/nusoap.php - About 35 mins to fix

                                                                                                                                                            Function parseString has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                            Open

                                                                                                                                                                function parseString($xml,$type){
                                                                                                                                                                    // parse xml string
                                                                                                                                                                    if($xml != ""){
                                                                                                                                                            
                                                                                                                                                                        // Create an XML parser.
                                                                                                                                                            Severity: Minor
                                                                                                                                                            Found in system/lib/nusoap/nusoap.php - About 35 mins to fix

                                                                                                                                                            Cognitive Complexity

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

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

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

                                                                                                                                                            Further reading

                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                            Open

                                                                                                                                                                            return $xml;
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                              Open

                                                                                                                                                                      return true;
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                Open

                                                                                                                                                                            return false;
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                  Open

                                                                                                                                                                              return $typeDef;
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                    Open

                                                                                                                                                                            return false;
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                      Open

                                                                                                                                                                                  return (boolean) $value;
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                        Open

                                                                                                                                                                                    return false;
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                          Open

                                                                                                                                                                                      return (int) $value;
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                            Open

                                                                                                                                                                                                return "";
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                              Open

                                                                                                                                                                                          return false;
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                Open

                                                                                                                                                                                        return (string) $value;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                  Open

                                                                                                                                                                                                          return $return;
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                    Open

                                                                                                                                                                                                return false;
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                      Open

                                                                                                                                                                                                  return false;
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        return $xml;
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                          Open

                                                                                                                                                                                                      return false;
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                            Open

                                                                                                                                                                                                            return false;
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                              Open

                                                                                                                                                                                                              return $return;
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                Open

                                                                                                                                                                                                            return false;
                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                                         return $return;
                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                  Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                                            return;
                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              return true;
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                                        return $xml;
                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                        Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                      return array();
                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                          Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                            Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                          return false;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                          return count($parameters) == 0;
                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                  Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                            return $xml;
                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                              return $xml;
                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                        Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                      return false;
                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                          Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                            Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                   return false;
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                        return $data;
                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                              return base64_decode($value);
                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                  Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

                                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                    return $return;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in system/lib/nusoap/nusoap.php - About 30 mins to fix

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

                                                                                                                                                                                                                                          function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
                                                                                                                                                                                                                                              parent::nusoap_base();
                                                                                                                                                                                                                                              $this->endpoint = $endpoint;
                                                                                                                                                                                                                                              $this->proxyhost = $proxyhost;
                                                                                                                                                                                                                                              $this->proxyport = $proxyport;
                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 25 mins to fix

                                                                                                                                                                                                                                      Cognitive Complexity

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

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

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

                                                                                                                                                                                                                                      Further reading

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

                                                                                                                                                                                                                                          function schemaEndElement($parser, $name) {
                                                                                                                                                                                                                                              // bring depth down a notch
                                                                                                                                                                                                                                              $this->depth--;
                                                                                                                                                                                                                                              // position of current element is equal to the last value left in depth_array for my depth
                                                                                                                                                                                                                                              if(isset($this->depth_array[$this->depth])){
                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php - About 25 mins to fix

                                                                                                                                                                                                                                      Cognitive Complexity

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

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

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

                                                                                                                                                                                                                                      Further reading

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

                                                                                                                                                                                                                                          function expandQname($qname){
                                                                                                                                                                                                                                              // get element prefix
                                                                                                                                                                                                                                              if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){
                                                                                                                                                                                                                                                  // get unqualified name
                                                                                                                                                                                                                                                  $name = substr(strstr($qname,':'),1);
                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.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

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

                                                                                                                                                                                                                                      class wsdl extends nusoap_base {
                                                                                                                                                                                                                                          // URL or filename of the root of this WSDL
                                                                                                                                                                                                                                          var $wsdl; 
                                                                                                                                                                                                                                          // define internal arrays of bindings, ports, operations, messages, etc.
                                                                                                                                                                                                                                          var $schemas = array();
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 3 mos to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.wsdl.php on lines 15..1936

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 15684.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      class soap_transport_http extends nusoap_base {
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                          var $url = '';
                                                                                                                                                                                                                                          var $uri = '';
                                                                                                                                                                                                                                          var $digest_uri = '';
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 2 mos to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soap_transport_http.php on lines 15..1304

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 9371.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      class nusoap_server extends nusoap_base {
                                                                                                                                                                                                                                          /**
                                                                                                                                                                                                                                           * HTTP headers of request
                                                                                                                                                                                                                                           * @var array
                                                                                                                                                                                                                                           * @access private
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 mo to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soap_server.php on lines 16..1118

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 7482.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      class nusoap_xmlschema extends nusoap_base  {
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          // files
                                                                                                                                                                                                                                          var $schema = '';
                                                                                                                                                                                                                                          var $xml = '';
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 mo to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.xmlschema.php on lines 15..964

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 6947.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      class nusoap_parser extends nusoap_base {
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                          var $xml = '';
                                                                                                                                                                                                                                          var $xml_encoding = '';
                                                                                                                                                                                                                                          var $method = '';
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 mo to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soap_parser.php on lines 15..634

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 5675.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      class nusoap_base {
                                                                                                                                                                                                                                          /**
                                                                                                                                                                                                                                           * Identification for HTTP headers.
                                                                                                                                                                                                                                           *
                                                                                                                                                                                                                                           * @var string
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 3 wks to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.nusoap_base.php on lines 85..890

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 4475.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                              if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){
                                                                                                                                                                                                                                                  // use WSDL for operation
                                                                                                                                                                                                                                                  $this->opData = $opData;
                                                                                                                                                                                                                                                  $this->debug("found operation");
                                                                                                                                                                                                                                                  $this->appendDebug('opData=' . $this->varDump($opData));
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 4 days to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 180..259

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 744.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) {
                                                                                                                                                                                                                                              $this->checkCookies();
                                                                                                                                                                                                                                              // detect transport
                                                                                                                                                                                                                                              switch(true){
                                                                                                                                                                                                                                                  // http(s)
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 3 days to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 415..484

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 589.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function _getProxyClassCode($r) {
                                                                                                                                                                                                                                              $this->debug("in getProxy endpointType=$this->endpointType");
                                                                                                                                                                                                                                              $this->appendDebug("wsdl=" . $this->varDump($this->wsdl));
                                                                                                                                                                                                                                              if ($this->endpointType != 'wsdl') {
                                                                                                                                                                                                                                                  $evalStr = 'A proxy can only be created for a WSDL client';
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 2 days to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 750..801

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 513.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function UpdateCookies($cookies) {
                                                                                                                                                                                                                                              if (sizeof($this->cookies) == 0) {
                                                                                                                                                                                                                                                  // no existing cookies: take whatever is new
                                                                                                                                                                                                                                                  if (sizeof($cookies) > 0) {
                                                                                                                                                                                                                                                      $this->debug('Setting new cookie(s)');
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 2 days to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 926..982

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 449.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function parseResponse($headers, $data) {
                                                                                                                                                                                                                                              $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:');
                                                                                                                                                                                                                                              $this->appendDebug($this->varDump($headers));
                                                                                                                                                                                                                                              if (!isset($headers['content-type'])) {
                                                                                                                                                                                                                                                  $this->setError('Response not of type text/xml (no content-type header)');
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 494..541

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 398.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
                                                                                                                                                                                                                                              parent::nusoap_base();
                                                                                                                                                                                                                                              $this->endpoint = $endpoint;
                                                                                                                                                                                                                                              $this->proxyhost = $proxyhost;
                                                                                                                                                                                                                                              $this->proxyport = $proxyport;
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 98..130

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 345.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function checkWSDL() {
                                                                                                                                                                                                                                              $this->appendDebug($this->wsdl->getDebug());
                                                                                                                                                                                                                                              $this->wsdl->clearDebug();
                                                                                                                                                                                                                                              $this->debug('checkWSDL');
                                                                                                                                                                                                                                              // catch errors
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 340..367

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 341.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function getProxy() {
                                                                                                                                                                                                                                              $r = rand();
                                                                                                                                                                                                                                              $evalStr = $this->_getProxyClassCode($r);
                                                                                                                                                                                                                                              //$this->debug("proxy class: $evalStr");
                                                                                                                                                                                                                                              if ($this->getError()) {
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 702..742

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 341.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      function iso8601_to_timestamp($datestr){
                                                                                                                                                                                                                                          $pattern = '/'.
                                                                                                                                                                                                                                          '([0-9]{4})-'.    // centuries & years CCYY-
                                                                                                                                                                                                                                          '([0-9]{2})-'.    // months MM-
                                                                                                                                                                                                                                          '([0-9]{2})'.    // days DD
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.nusoap_base.php on lines 943..973

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 321.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      function timestamp_to_iso8601($timestamp,$utc=true){
                                                                                                                                                                                                                                          $datestr = date('Y-m-d\TH:i:sO',$timestamp);
                                                                                                                                                                                                                                          $pos = strrpos($datestr, "+");
                                                                                                                                                                                                                                          if ($pos === FALSE) {
                                                                                                                                                                                                                                              $pos = strrpos($datestr, "-");
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.nusoap_base.php on lines 904..934

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 286.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                              if($errstr = $this->getError()){
                                                                                                                                                                                                                                                  $this->debug('Error: '.$errstr);
                                                                                                                                                                                                                                                  return false;
                                                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                                                  $this->return = $return;
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 292..332

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 279.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      class nusoap_fault extends nusoap_base {
                                                                                                                                                                                                                                          /**
                                                                                                                                                                                                                                           * The fault code (client|server)
                                                                                                                                                                                                                                           * @var string
                                                                                                                                                                                                                                           * @access private
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soap_fault.php on lines 14..81

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 238.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function checkCookies() {
                                                                                                                                                                                                                                              if (sizeof($this->cookies) == 0) {
                                                                                                                                                                                                                                                  return true;
                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                              $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies');
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 893..917

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 227.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                      class soapval extends nusoap_base {
                                                                                                                                                                                                                                          /**
                                                                                                                                                                                                                                           * The XML element name
                                                                                                                                                                                                                                           *
                                                                                                                                                                                                                                           * @var string
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soap_val.php on lines 17..102

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 210.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                              if ($style == 'rpc') {
                                                                                                                                                                                                                                                  if ($use == 'literal') {
                                                                                                                                                                                                                                                      $this->debug("wrapping RPC request with literal method element");
                                                                                                                                                                                                                                                      if ($namespace) {
                                                                                                                                                                                                                                                          // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 261..284

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 163.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

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

                                                                                                                                                                                                                                          function loadWSDL() {
                                                                                                                                                                                                                                              $this->debug('instantiating wsdl class with doc: '.$this->wsdlFile);
                                                                                                                                                                                                                                              $this->wsdl = new wsdl('',$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout,$this->curl_options,$this->use_curl);
                                                                                                                                                                                                                                              $this->wsdl->setCredentials($this->username, $this->password, $this->authtype, $this->certRequest);
                                                                                                                                                                                                                                              $this->wsdl->fetchWSDL($this->wsdlFile);
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in system/lib/nusoap/nusoap.php and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                      system/lib/nusoap/class.soapclient.php on lines 374..380

                                                                                                                                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                      This issue has a mass of 122.

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

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

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

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

                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                      There are no issues that match your filters.

                                                                                                                                                                                                                                      Category
                                                                                                                                                                                                                                      Status