Showing 30 of 30 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public string $request_id,
public int $status,
public array $headers,
public string $content,
public string $version,
Method assertAttribute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function assertAttribute(WebDriverBy|string $selector, string $attribute, $value, bool $not = false, bool $contains = false): static
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public string $name,
public ?string $value = null,
public int|DateTimeInterface|null $expiry = null,
public array $options = [],
bool $encrypt = true,
Function find
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function find(?string $in = null): ?string
{
$in ??= $this->cwd;
if (file_exists("{$in}/composer.json")) {
- 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 clickMatchingOptions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function clickMatchingOptions(Collection $options, bool $multiple = false)
{
// If we're not passed a value, just click a random item
if (null === $this->value) {
$options->random()->click();
- 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 performAssertions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function performAssertions(RemoteWebDriverBroker $broker): void
{
$segments = parse_url($this->actual);
$segments['url'] = sprintf(
- 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 ProcessManager::getInstance(config('dawn'));
Avoid too many return
statements within this method. Open
return new SeleniumDriverProcess(port: $this->seleniumPort());
Avoid too many return
statements within this method. Open
return $app->make(ProcessManager::class)->remote_web_driver;
Avoid too many return
statements within this method. Open
return new Browser(
broker: $app->make(ProcessManager::class)->remote_web_driver,
loop: $app->make('dawn.loop'),
);