Showing 226 of 573 total issues
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Request $request,
ClientManagerInterface $manager,
EntityManagerInterface $entityManager,
CredentialsRevokerInterface $revoker,
ValidatorInterface $validator,
Function validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
#[Assert\Callback]
public function validate(
ExecutionContextInterface $context,
$payload
) {
- 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 __invoke
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __invoke(string $body, array $tags): string
{
$current = ($this->tagExtract)($body, null) ?? [];
$join = array_unique(array_merge(array_diff($tags, $current)));
- 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
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'user_id')]
User $user,
PostRepository $repository,
PostFactory $factory,
RequestStack $request,
Method byMagazine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'magazine_id')]
Magazine $magazine,
PostRepository $repository,
PostFactory $factory,
RequestStack $request,
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
SearchManager $manager,
UserFactory $userFactory,
MagazineFactory $magazineFactory,
SettingsManager $settingsManager,
RateLimiterFactory $apiReadLimiter,
Function validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
#[Assert\Callback]
public function validate(
ExecutionContextInterface $context,
$payload
) {
- 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
Method uploadImage
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'post_id')]
Post $post,
#[MapEntity(id: 'comment_id')]
?PostComment $parent,
PostCommentCreate $postCommentCreate,
Function validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
#[Assert\Callback]
public function validate(
ExecutionContextInterface $context,
$payload
) {
- 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
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'domain_id')]
Domain $domain,
EntryRepository $repository,
EntryFactory $factory,
RequestStack $request,
Method create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
int $id,
string $reason = null,
\DateTimeInterface $expiredAt = null,
MagazineSmallResponseDto $magazine = null,
UserSmallResponseDto $user = null,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $body,
?Entry $entry,
User $user,
EntryComment $parent = null,
string $ip = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $url,
string $label,
string $title,
private string $kbinUsername,
private MentionType $type,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $activityPubUrl,
string $label,
string $title,
private string $kbinUsername,
private MentionType $type,
Method getStats
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
?Magazine $magazine,
string $intervalStr,
?\DateTime $start,
?\DateTime $end,
?bool $onlyLocal
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'magazine_id')]
Magazine $magazine,
#[MapEntity(id: 'user_id')]
User $user,
MagazineModeratorRemove $magazineModeratorRemove,
Method collection
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
PostRepository $repository,
PostFactory $factory,
RequestStack $request,
RateLimiterFactory $apiReadLimiter,
RateLimiterFactory $anonymousApiReadLimiter
Method fetchOnline
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $topic,
string $mercurePublicUrl,
string $mercureSubscriptionsToken,
HttpClientInterface $httpClient,
CacheInterface $cache
Method getEntryCommentPageResponse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $template,
EntryCommentPageView $criteria,
FormInterface $form,
Request $request,
EntryComment $parent = null,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'magazine_id')]
Magazine $magazine,
#[MapEntity(id: 'user_id')]
User $user,
MagazineModeratorAdd $magazineModeratorAdd,