Showing 189 of 189 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Host $host,
string $command,
int $exitCode,
string $output,
string $errorOutput,
Method option
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function option(string $name, $shortcut = null, ?int $mode = null, string $description = '', $default = null): void
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
int $major = 0,
int $minor = 0,
int $patch = 0,
array $pre = [],
array $build = [],
Function host
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function host(string ...$hostname)
{
$deployer = Deployer::get();
if (count($hostname) === 1 && $deployer->hosts->has($hostname[0])) {
return $deployer->hosts->get($hostname[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 send
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function send(?array &$info = null): string
{
if ($this->url === '') {
throw new \RuntimeException('URL must not be empty to Httpie::send()');
}
- 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 commit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function commit(array $hosts, Task $task): void
{
$row = [];
foreach ($this->template as $alias) {
$on = "-";
- 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 parseRequest
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function parseRequest($request)
{
$lines = explode("\r\n", $request);
$requestLine = $lines[0];
$parts = explode(' ', $requestLine);
- 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 expand
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function expand(array $hostnames): array
{
$expanded = [];
foreach ($hostnames as $hostname) {
if (preg_match(self::PATTERN, $hostname, $matches)) {
- 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 extend
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function extend(string $id, callable $callable)
{
if (!isset($this->keys[$id])) {
throw new UnknownIdentifierException($id);
}
- 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
Avoid too many return
statements within this method. Open
return self::GREATER_THAN;
Avoid too many return
statements within this method. Open
return $this->parse($default);
Avoid too many return
statements within this method. Open
return new Messenger($c['input'], $c['output'], $c['logger']);
Avoid too many return
statements within this method. Open
return $this->cumulativeExitCode($processes);
Avoid too many return
statements within this method. Open
return 'bash -s'; // Non-login shell for localhost.
Avoid too many return
statements within this method. Open
return new Importer();
Avoid too many return
statements within this method. Open
return $x;
Avoid too many return
statements within this method. Open
return new Collection();
Avoid too many return
statements within this method. Open
return $x;
Avoid too many return
statements within this method. Open
return new Response(404, null);
Avoid too many return
statements within this method. Open
return new ProcessRunner($c['pop'], $c['logger']);