Showing 226 of 573 total issues
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
string $name,
string $title,
User $user,
?string $description,
?string $rules,
Method uploadImage
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
ClientManagerInterface $manager,
ClientFactory $clientFactory,
UserCreate $userCreate,
UserRepository $userRepository,
SettingsManager $settingsManager,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $fileName,
string $filePath,
string $sha256,
?int $width,
?int $height,
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'magazine_id')]
Magazine $magazine,
EntryBadgeCreate $entryBadgeCreate,
MagazineFactory $factory,
SerializerInterface $serializer,
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'magazine_id')]
Magazine $magazine,
MagazineThemeChange $magazineThemeChange,
MagazineFactory $magazineFactory,
ImageFactory $imageFactory,
Function getMonthlyStats
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getMonthlyStats(): array
{
$conn = $this->getEntityManager()
->getConnection();
- 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 updateUser
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateUser(string $actorUrl): User
{
$user = $this->userRepository->findOneBy(['apProfileId' => $actorUrl]);
$actor = $this->apHttpClient->getActorObject($actorUrl);
- 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 create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function create(UserSmallResponseDto $sender, string $body, string $status, int $threadId, \DateTimeImmutable $createdAt, int $messageId): self
Function setDimensions
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function setDimensions(?int $width, ?int $height): void
{
if (null !== $width && $width <= 0) {
throw new \InvalidArgumentException('$width must be NULL or >0');
}
- 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 create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function create(int $consentId, string $clientName, ?string $clientDescription, ?ImageDto $logo, array $scopesGranted, array $scopesAvailable): self
Function findOrCreateFromPath
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function findOrCreateFromPath(string $source): ?Image
{
$fileName = $this->imageManager->getFileName($source);
$filePath = $this->imageManager->getFilePath($source);
$sha256 = hash_file('sha256', $source, true);
- 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: 'magazine_id')]
Magazine $magazine,
MagazineEdit $magazineEdit,
MagazineFactory $magazineFactory,
ValidatorInterface $validator,
Function __invoke
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __invoke(
#[MapEntity(mapping: ['magazine_name' => 'name'])]
Magazine $magazine,
#[MapEntity(id: 'entry_id')]
Entry $entry,
- 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: 'post_id')]
Post $post,
PostEdit $postEdit,
PostFactory $postFactory,
ValidatorInterface $validator,
Function __invoke
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __invoke(
#[MapEntity(mapping: ['magazine_name' => 'name'])]
Magazine $magazine,
#[MapEntity(id: 'post_id')]
Post $post,
- 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: 'post_id')]
Post $post,
#[MapEntity(id: 'comment_id')]
?PostComment $parent,
PostCommentCreate $postCommentCreate,
Method uploadImage
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'entry_id')]
Entry $entry,
#[MapEntity(id: 'comment_id')]
?EntryComment $parent,
EntryCommentCreate $entryCommentCreate,
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'user_id')]
User $user,
EntryRepository $repository,
EntryFactory $factory,
RequestStack $request,
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'entry_id')]
Entry $entry,
#[MapEntity(id: 'comment_id')]
?EntryComment $parent,
EntryCommentCreate $entryCommentCreate,
Method __invoke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
#[MapEntity(id: 'magazine_id')]
Magazine $magazine,
EntryRepository $repository,
EntryFactory $factory,
RequestStack $request,