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,
Severity: Minor
Found in src/Http/Commands/SendWebResponse.php - About 35 mins to fix

    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
    Severity: Minor
    Found in src/Browser/Concerns/ExecutesAssertionCommands.php - About 35 mins to fix

      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,
      Severity: Minor
      Found in src/Browser/Commands/Cookies/AddCookie.php - About 35 mins to fix

        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")) {
        Severity: Minor
        Found in src/Support/ArtisanExecutableFinder.php - About 35 mins to fix

        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();
        Severity: Minor
        Found in src/Browser/Commands/Elements/Select.php - About 35 mins to fix

        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(
        Severity: Minor
        Found in src/Browser/Commands/Assertions/AssertUrl.php - About 35 mins to fix

        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'));
        Severity: Major
        Found in src/Providers/DawnServiceProvider.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return new SeleniumDriverProcess(port: $this->seleniumPort());
          Severity: Major
          Found in src/Providers/DawnServiceProvider.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return $app->make(ProcessManager::class)->remote_web_driver;
            Severity: Major
            Found in src/Providers/DawnServiceProvider.php - About 30 mins to fix

              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'),
                          );
              Severity: Major
              Found in src/Providers/DawnServiceProvider.php - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language