Showing 48 of 48 total issues
Function parseInput
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function parseInput(\DOMElement $input, array $formData, array &$consumed)
{
$name = strtolower($input->getAttribute('name'));
if (!$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
Method createFromString
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createFromString($proxy)
{
if (preg_match('#^[a-zA-Z0-9]+://#', $proxy)) {
list($type, $proxy) = explode('://', $proxy, 2);
Method cloneAs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function cloneAs($as = null)
{
if (null === $as) {
$as = static::class;
Method initWithDefaults
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$scheme = null,
$host = null,
$path = null,
array $query = [],
$hash = null,
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$scheme = null,
$host = null,
$path = null,
array $query = [],
$hash = null,
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$scheme = null,
$host = null,
$path = null,
array $query = [],
$hash = null,
Method build
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$scheme = null,
$host = null,
$path = null,
array $query = [],
$hash = null,
Method build
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$scheme = null,
$host = null,
$path = null,
array $query = [],
$hash = null,
Method build
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$scheme,
$host,
$path = null,
array $query = [],
$hash = null,
Function resolve
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function resolve($url, $as = null)
{
if (null === $as) {
$as = static::class;
$implements = class_implements($as, true);
- 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
array $httpResponseHeaders,
$httpResponseStatus,
$pageContent,
$pageEvaluated,
UrlArchive $initialUrl,
Function initWithDefaults
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function initWithDefaults(
$scheme = null,
$host = null,
$path = null,
array $query = [],
- 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 queryItemToString
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function queryItemToString($value)
{
if (is_string($value)) {
if (strlen($value) > 0) {
- 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 setParams
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function setParams(array $params)
{
$this->query = [];
foreach ($params as $k => $v) {
if (is_object($v)) {
- 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 requestFromForm
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\DOMElement $formNode,
array $formData = [],
$strict = true,
$submit = true,
RequestInterface $request = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($host, $port, $user = null, $password = null, $type = 'HTTP')
Method all
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function all($domain = null, $path = null, $name = null, $skipDiscardable = false, $skipExpired = true);
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
HttpClientInterface $httpClient,
$userAgent = null,
$acceptLanguage = null,
CookieJarInterface $cookieJar = null,
ProxyInterface $proxy = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$captchaType,
CaptchaSolverInterface $captchaSolver,
$additionalMessage = null,
$code = 0,
Exception $previous = null
Method all
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function all($domain = null, $path = null, $name = null, $skipDiscardable = false, $skipExpired = true)