Showing 13 of 15 total issues
File WSDL.php
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace PHP2WSDL;
use DOMDocument;
Function addMethodToWsdl
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
protected function addMethodToWsdl(ReflectionMethod $method, DOMElement $port, DOMElement $binding)
{
$args = [];
$annotations = [];
$sequence = [];
- Read upRead up
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 23 (exceeds 5 allowed). Consider refactoring. Open
public function addComplexType($type)
{
if (isset($this->includedTypes[$type])) {
return $this->includedTypes[$type];
}
- Read upRead up
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 addMethodToWsdl
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addMethodToWsdl(ReflectionMethod $method, DOMElement $port, DOMElement $binding)
{
$args = [];
$annotations = [];
$sequence = [];
WSDL
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class WSDL
{
/**
* The DOMDocument instance.
Function addBindingOperation
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function addBindingOperation(DOMElement $binding,
$name,
array $input = null,
array $output = null,
array $inputHeaders = null,
- Read upRead up
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 parseElement
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function parseElement(array $element)
{
$elementXml = $this->dom->createElement('xsd:element');
foreach ($element as $key => $value) {
if (in_array($key, ['sequence', 'all', 'choice'])) {
- Read upRead up
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 addComplexType
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addComplexType($type)
{
if (isset($this->includedTypes[$type])) {
return $this->includedTypes[$type];
}
Method addBindingOperation
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addBindingOperation(DOMElement $binding,
$name,
array $input = null,
array $output = null,
array $inputHeaders = null,
Function getXSDType
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getXSDType($type)
{
if ($this->isXDSType($type)) {
return self::$XSDTypes[strtolower($type)];
} elseif ($type) {
- Read upRead up
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 addBindingOperation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addBindingOperation(DOMElement $binding,
$name,
array $input = null,
array $output = null,
array $inputHeaders = null,
Function addMessage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function addMessage($name, array $parts)
{
$message = $this->dom->createElement('message');
$message->setAttribute('name', $name);
- Read upRead up
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 generateWSDLClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function generateWSDLClass($class)
{
$ref = new ReflectionClass($class);
$docs = $ref->getReflectionDocComment()->getAnnotationsCollection();
if ($docs->hasAnnotationTag('soap')) {
- Read upRead up
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"