Showing 226 of 573 total issues
Method favourited
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
PostRepository $repository,
PostFactory $factory,
RequestStack $request,
RateLimiterFactory $apiReadLimiter,
RateLimiterFactory $anonymousApiReadLimiter
Method setSubject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Entry|EntryComment|Post|PostComment|null $subject,
EntryFactory $entryFactory,
EntryCommentFactory $entryCommentFactory,
PostFactory $postFactory,
PostCommentFactory $postCommentFactory,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'comment_id')]
EntryComment $comment,
int $choice,
VoteCreate $voteCreate,
EntryCommentFactory $factory,
Method create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
int $magazineId = null,
int $userId = null,
string $username = null,
string $apId = null,
ImageDto $avatar = null
Method profile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
UserEdit $userEdit,
UserFactory $userFactory,
ValidatorInterface $validator,
UserFactory $factory,
RateLimiterFactory $apiUpdateLimiter
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'entry_id')]
Entry $entry,
#[MapEntity(id: 'target_id')]
Magazine $target,
EntryMagazineChange $entryMagazineChange,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'comment_id')]
PostComment $comment,
PostCommentEdit $postCommentEdit,
PostCommentFactory $factory,
ValidatorInterface $validator,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'comment_id')]
EntryComment $comment,
EntryCommentEdit $entryCommentEdit,
EntryCommentFactory $factory,
ValidatorInterface $validator,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
SiteRepository $repository,
EntityManagerInterface $entityManager,
SerializerInterface $serializer,
ValidatorInterface $validator,
RateLimiterFactory $apiModerateLimiter
Method uploadImage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'magazine_id')]
Magazine $magazine,
ValidatorInterface $validator,
EntryCreate $entryCreate,
EntryFactory $entryFactory,
Method collection
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
EntryRepository $repository,
EntryFactory $factory,
RequestStack $request,
RateLimiterFactory $apiReadLimiter,
RateLimiterFactory $anonymousApiReadLimiter,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $email = null,
string $username = null,
string $url = null,
bool $isActive = false,
User $user = null
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'comment_id')]
PostComment $comment,
int $choice,
VoteCreate $voteCreate,
PostCommentFactory $factory,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'user_id')]
User $user,
EntryCommentRepository $repository,
RequestStack $request,
RateLimiterFactory $apiReadLimiter,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'entry_id')]
Entry $entry,
int $choice,
VoteCreate $voteCreate,
EntryFactory $factory,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'entry_id')]
Entry $entry,
EntryFactory $factory,
EventDispatcherInterface $dispatcher,
RateLimiterFactory $apiReadLimiter,
Method __invoke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'domain_id')]
Domain $domain,
EntryCommentRepository $repository,
RequestStack $request,
RateLimiterFactory $apiReadLimiter,
Function validate
has a Cognitive Complexity of 7 (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 handleInput
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
handleInput (event) {
// ctrl + enter to submit form
if (event.ctrlKey && event.key === "Enter") {
this.element.form.submit();
}
- 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 blurhash
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function blurhash(string $filePath): ?string
{
try {
$image = imagecreatefromstring(file_get_contents($filePath));
$width = imagesx($image);
- 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"