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,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
UuidInterface $id,
string $version,
string $reference,
int $size,
\DateTimeImmutable $date,
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)
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $region,
bool $isOpaqueAuth,
?string $key = null,
?string $secret = null,
?string $endpoint = null,
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
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
UuidInterface $id,
User $user,
string $type,
string $accessToken,
?string $refreshToken = null,
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)
Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
declare(strict_types=1);
namespace Buddy\Repman\Form\Type\User;
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
declare(strict_types=1);
namespace Buddy\Repman\Form\Type\Organization;
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(array $emails, string $organizationAlias, string $packageName, string $packageId, array $result)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\DateTimeImmutable $date,
Instance $instance,
array $organizations,
Downloads $downloads,
Proxy $proxy
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
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
SecurityChecker $checker,
PackageManager $packageManager,
ScanResultRepository $results,
MessageBusInterface $messageBus,
Storage $distStorage
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(string $id, string $name, string $alias, array $members, bool $hasAnonymousAccess)
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
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
UuidInterface $id,
Package $package,
string $type,
string $target,
string $constraint
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(string $id, string $email, string $plainPassword, string $confirmToken, array $roles = [])
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
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(string $packageId, string $version, \DateTimeImmutable $date, ?string $ip, ?string $userAgent)