repman-io/repman

View on GitHub

Showing 140 of 140 total issues

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        PackageManager $packageManager,
        PackageNormalizer $packageNormalizer,
        PackageRepository $packageRepository,
        Storage $distStorage,
        UserOAuthTokenRefresher $tokenRefresher,
Severity: Minor
Found in src/Service/PackageSynchronizer/ComposerPackageSynchronizer.php - About 45 mins to fix

    Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            UuidInterface $id,
            string $version,
            string $reference,
            int $size,
            \DateTimeImmutable $date,
    Severity: Minor
    Found in src/Entity/Organization/Package/Version.php - About 45 mins to fix

      Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function __construct(string $id, string $organizationId, string $url, string $type = 'vcs', array $metadata = [], ?int $keepLastReleases = null)
      Severity: Minor
      Found in src/Message/Organization/AddPackage.php - About 45 mins to fix

        Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                string $region,
                bool $isOpaqueAuth,
                ?string $key = null,
                ?string $secret = null,
                ?string $endpoint = null,
        Severity: Minor
        Found in src/Service/Integration/Aws/S3AdapterFactory.php - About 45 mins to fix

          Method syncSuccess has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function syncSuccess(string $name, string $description, string $latestReleasedVersion, array $encounteredVersions, array $encounteredLinks, \DateTimeImmutable $latestReleaseDate): void
          Severity: Minor
          Found in src/Entity/Organization/Package.php - About 45 mins to fix

            Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    UuidInterface $id,
                    User $user,
                    string $type,
                    string $accessToken,
                    ?string $refreshToken = null,
            Severity: Minor
            Found in src/Entity/User/OAuthToken.php - About 45 mins to fix

              Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function __construct(string $instanceIdFile, TelemetryQuery $query, Endpoint $endpoint, Config $config, MessageCountAwareInterface $failedTransport, ProxyRegister $proxies)
              Severity: Minor
              Found in src/Service/Telemetry.php - About 45 mins to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                <?php
                
                declare(strict_types=1);
                
                namespace Buddy\Repman\Form\Type\User;
                Severity: Minor
                Found in src/Form/Type/User/ChangeEmailPreferencesType.php and 1 other location - About 40 mins to fix
                src/Form/Type/Organization/ChangeAnonymousAccessType.php on lines 1..32

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 93.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                <?php
                
                declare(strict_types=1);
                
                namespace Buddy\Repman\Form\Type\Organization;
                Severity: Minor
                Found in src/Form/Type/Organization/ChangeAnonymousAccessType.php and 1 other location - About 40 mins to fix
                src/Form/Type/User/ChangeEmailPreferencesType.php on lines 1..32

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 93.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function __construct(UuidInterface $id, string $email, string $emailConfirmToken, array $roles, ?string $timezone = null)
                Severity: Minor
                Found in src/Entity/User.php - About 35 mins to fix

                  Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function __construct(array $emails, string $organizationAlias, string $packageName, string $packageId, array $result)
                  Severity: Minor
                  Found in src/Message/Security/SendScanResult.php - About 35 mins to fix

                    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            \DateTimeImmutable $date,
                            Instance $instance,
                            array $organizations,
                            Downloads $downloads,
                            Proxy $proxy
                    Severity: Minor
                    Found in src/Service/Telemetry/Entry.php - About 35 mins to fix

                      Method sendScanResult has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public function sendScanResult(array $emails, string $packageName, string $packageId, string $organizationAlias, array $result): void
                      Severity: Minor
                      Found in src/Service/Mailer/SymfonyMailer.php - About 35 mins to fix

                        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                SecurityChecker $checker,
                                PackageManager $packageManager,
                                ScanResultRepository $results,
                                MessageBusInterface $messageBus,
                                Storage $distStorage
                        Severity: Minor
                        Found in src/Service/Security/PackageScanner/SensioLabsPackageScanner.php - About 35 mins to fix

                          Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public function __construct(string $id, string $name, string $alias, array $members, bool $hasAnonymousAccess)
                          Severity: Minor
                          Found in src/Query/User/Model/Organization.php - About 35 mins to fix

                            Method removeVersionDists has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public function removeVersionDists(string $organizationAlias, string $packageName, string $version, string $format, string $excludeRef): self
                            Severity: Minor
                            Found in src/Service/Organization/PackageManager.php - About 35 mins to fix

                              Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      UuidInterface $id,
                                      Package $package,
                                      string $type,
                                      string $target,
                                      string $constraint
                              Severity: Minor
                              Found in src/Entity/Organization/Package/Link.php - About 35 mins to fix

                                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function __construct(string $id, string $email, string $plainPassword, string $confirmToken, array $roles = [])
                                Severity: Minor
                                Found in src/Message/User/CreateUser.php - About 35 mins to fix

                                  Method distribution has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      public function distribution(Organization $organization, string $package, string $version, string $ref, string $type): StreamedResponse
                                  Severity: Minor
                                  Found in src/Controller/RepoController.php - About 35 mins to fix

                                    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        public function __construct(string $packageId, string $version, \DateTimeImmutable $date, ?string $ip, ?string $userAgent)
                                    Severity: Minor
                                    Found in src/Message/Organization/AddDownload.php - About 35 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language