Showing 85 of 140 total issues
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)
Method distFilename
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function distFilename(string $organizationAlias, string $package, string $version, string $ref, string $format): Option
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
public function __construct(string $id, int $tokens, bool $public, int $members, int $owners)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(UuidInterface $id, Package $package, \DateTimeImmutable $date, string $status, array $content)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(string $repo, string $package, string $version, string $ref, string $format)
Method distribution
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function distribution(string $package, string $version, string $ref, string $type, Request $request): Response
Method paginate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function paginate(callable $listFunction, int $total, int $perPage, int $page, string $baseUrl): array
Function __construct
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(
string $region,
bool $isOpaqueAuth,
?string $key = null,
?string $secret = null,
- 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 tryToRemoveWebhook
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function tryToRemoveWebhook(Package $package): ?string
{
$warning = null;
if ($package->getWebhookCreatedAt() !== null) {
try {
- 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 tryToRemoveWebhook
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function tryToRemoveWebhook(Package $package): void
{
if ($package->webhookCreatedAt() !== null) {
try {
switch ($package->type()) {
- 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 false;
Function handleAddPackage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function handleAddPackage(?string $type, FormInterface $form, Organization $organization, array $json): ?string
{
$id = null;
switch ($type) {
- 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 findProviders
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function findProviders(string $organizationAlias, array $packages): array
{
$data = [];
$lastModified = null;
- 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 diff
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function diff(Environment $env, $date, $now = null): string
{
$date = twig_date_converter($env, $date);
$now = $now === null
- 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 loadREADME
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function loadREADME(Dist $dist): ?string
{
$tmpLocalFilename = $this->distStorage->getLocalFileForDist($dist);
if (null === $tmpLocalFilename->getOrNull()) {
return null;
- 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"