amtgard/ORK3

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

Summary

Maintainability
F
4 mos
Test Coverage

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/class.wsdl.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

File class.wsdl.php has 1501 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php




Severity: Major
Found in system/lib/nusoap/class.wsdl.php - About 4 days to fix

    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/class.wsdl.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 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/class.wsdl.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 93 (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/class.wsdl.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 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/class.wsdl.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/class.wsdl.php - About 1 day to fix

      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/class.wsdl.php - About 7 hrs to fix

        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/class.wsdl.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/class.wsdl.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 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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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 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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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 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/class.wsdl.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/class.wsdl.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/class.wsdl.php - About 2 hrs 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/class.wsdl.php - About 1 hr to fix

                                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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.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 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/class.wsdl.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/class.wsdl.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/class.wsdl.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/class.wsdl.php - About 1 hr 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/class.wsdl.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/class.wsdl.php - About 45 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/class.wsdl.php - About 40 mins to fix

                                              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/class.wsdl.php - About 40 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/class.wsdl.php - About 35 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                          return true;
                                                  Severity: Major
                                                  Found in system/lib/nusoap/class.wsdl.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/class.wsdl.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

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

                                                        Avoid too many return statements within this method.
                                                        Open

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

                                                          Avoid too many return statements within this method.
                                                          Open

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

                                                            Avoid too many return statements within this method.
                                                            Open

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

                                                              Avoid too many return statements within this method.
                                                              Open

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

                                                                Avoid too many return statements within this method.
                                                                Open

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

                                                                  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/class.wsdl.php and 1 other location - About 3 mos to fix
                                                                  system/lib/nusoap/nusoap.php on lines 4597..6518

                                                                  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

                                                                  There are no issues that match your filters.

                                                                  Category
                                                                  Status