Showing 15 of 17 total issues
Request
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
class Request implements RequestInterface, OptionableInterface, StringableInterface
{
use StringableTrait;
/** @var string */
MultiRequest
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class MultiRequest implements RequestInterface
{
/** @var resource */
protected $_resource;
Method withMethod
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function withMethod(string $method) : self
{
$this->_method = $method;
unset(
Method details
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function details($var) : string
{
$result = self::get($var);
$format = '%s';
$args = [ $result ];
Function details
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function details($var) : string
{
$result = self::get($var);
$format = '%s';
$args = [ $result ];
- 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 flattenKeys
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function flattenKeys(array $array, string $glue = '.', ?int $depth = null, string $prefix = '')
{
if ('' !== $prefix && !StringUtil::endsWith($prefix, $glue)) {
$prefix .= $glue;
}
- 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 withMethod
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function withMethod(string $method) : self
{
$this->_method = $method;
unset(
- 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 callable
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function callable(callable $callable) : ?string
{
$result = null;
switch (true) {
case ($callable instanceof \Closure):
- 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 request
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function request(string $id, callable $callback, array $params = [])
{
if (!$this->has($id)) {
$createdService = $callback(...$params);
- 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 joinFormat
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function joinFormat(string $format, iterable $iterator, bool $exclEmpty = true) : array
{
$formatHasKey = (false !== \strpos($format, '%k'));
$formatHasIndex = (false !== \strpos($format, '%i'));
$formatHasValue = (false !== \strpos($format, '%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
Function unset
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function unset(...$idOrService) : array
{
$result = [];
foreach ($idOrService as $param) {
$id = false;
- 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 _filterOptions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _filterOptions(array $options) : array
{
$constants = Curl::infoConstants();
$result = [];
- 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 execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function execute() : self
{
$this->init();
$this->_queueTotal = \count($this->_queue);
$this->_queueLeft = $this->_queueTotal;
- 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 flatten
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function flatten(array $array, ?int $depth = null)
{
if (0 === $depth) {
return \array_values($array);
}
- 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 __construct
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(string $ownerClass, array $customValues = [])
{
parent::__construct($ownerClass);
$this->_hasCustomValues = !empty($customValues);
- 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"