Showing 23 of 23 total issues
URI
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class URI implements UriInterface
{
/**
* @var string
*/
Function requireUploadedFiles
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function requireUploadedFiles()
{
if($this->uploadedFiles !== null) {
return;
}
- 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 __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
$protocolVersion,
$headers,
$body,
$method,
$uri,
Method serverRequest
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
$protocolVersion,
$headers,
$body,
$method,
$uri,
Method cookiesUpdate
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$name,
$value,
$expires = null,
$path = '/',
$domain = null,
Method set
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$name,
$value,
$lifetime = null,
$path = '/',
$domain = null,
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$name,
$value,
$expires = null,
$path = '/',
$domain = null,
Function mergeContextHeaders
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function mergeContextHeaders($context)
{
$headers = $this->headers->asArray();
if($context === 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
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($messages, $server, $get, $post, $cookies, $files, $attributes = array())
Method sapiServerRequest
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$server = null,
$get = null,
$post = null,
$cookie = null,
$files = null,
Function requireHeaders
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function requireHeaders()
{
if($this->processedHeaders) {
return;
}
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$messages,
$file,
$clientFilename = null,
$clientMediaType = null,
$size = null,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($protocolVersion, $headers, $body, $method, $uri)
Method response
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function response($protocolVersion, $headers, $body, $statusCode = 200, $reasonPhrase = null)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($protocolVersion, $headers, $body, $statusCode = 200, $reasonPhrase = null)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($messages, $headers, $body, $statusCode = 200, $reasonPhrase = null)
Method request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function request($protocolVersion, $headers, $body, $method, $uri)
Method uploadedFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$file,
$clientFilename = null,
$clientMediaType = null,
$size = null,
$error = UPLOAD_ERR_OK
Function modifyHeader
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function modifyHeader($header, $value, $append = false, $clone = true)
{
$this->requireHeaders();
if (!is_array($value)) {
$value = array($value);
- 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 __toString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function __toString()
{
if ($this->uriString === null) {
$uri = '';
- 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"