Skip to content

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

@@ -0,0 +1,256 @@
<?php

declare(strict_types=1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a single space around assignment operators

use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class LpProgressReminderCommand extends Command

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing class doc comment


private const NUMBER_OF_DAYS_TO_RESEND_NOTIFICATION = 3;

public function __construct(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing function doc comment

private const NUMBER_OF_DAYS_TO_RESEND_NOTIFICATION = 3;

public function __construct(
private CourseRepository $courseRepository,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8


public function __construct(
private CourseRepository $courseRepository,
private CourseRelUserRepository $courseRelUserRepository,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

private const NUMBER_OF_DAYS_TO_RESEND_NOTIFICATION = 3;

public function __construct(
private readonly CourseRepository $courseRepository,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8


public function __construct(
private readonly CourseRepository $courseRepository,
private readonly CourseRelUserRepository $courseRelUserRepository,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

public function __construct(
private readonly CourseRepository $courseRepository,
private readonly CourseRelUserRepository $courseRelUserRepository,
private readonly SessionRelCourseRelUserRepository $sessionRelCourseRelUserRepository,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

private readonly CourseRepository $courseRepository,
private readonly CourseRelUserRepository $courseRelUserRepository,
private readonly SessionRelCourseRelUserRepository $sessionRelCourseRelUserRepository,
private readonly ExtraFieldValuesRepository $extraFieldValuesRepository,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

private readonly CourseRelUserRepository $courseRelUserRepository,
private readonly SessionRelCourseRelUserRepository $sessionRelCourseRelUserRepository,
private readonly ExtraFieldValuesRepository $extraFieldValuesRepository,
private readonly TrackEDefaultRepository $trackEDefaultRepository,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

private readonly SessionRelCourseRelUserRepository $sessionRelCourseRelUserRepository,
private readonly ExtraFieldValuesRepository $extraFieldValuesRepository,
private readonly TrackEDefaultRepository $trackEDefaultRepository,
private readonly UserRepository $userRepository,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

private readonly ExtraFieldValuesRepository $extraFieldValuesRepository,
private readonly TrackEDefaultRepository $trackEDefaultRepository,
private readonly UserRepository $userRepository,
private readonly Environment $twig,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

private readonly TrackEDefaultRepository $trackEDefaultRepository,
private readonly UserRepository $userRepository,
private readonly Environment $twig,
private readonly TranslatorInterface $translator,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

private readonly UserRepository $userRepository,
private readonly Environment $twig,
private readonly TranslatorInterface $translator,
private readonly MessageHelper $messageHelper,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

private readonly Environment $twig,
private readonly TranslatorInterface $translator,
private readonly MessageHelper $messageHelper,
private readonly UrlGeneratorInterface $urlGenerator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8


if (empty($lpItems)) {
$output->writeln('No learning paths with days for completion found.');
return Command::SUCCESS;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing blank line before return statement

}

$output->writeln('LP progress reminder process finished.');
return Command::SUCCESS;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing blank line before return statement

if ($debugMode) {
echo "No registration date found for user $userId in course $courseId (session ID: $sessionId).\n";
}
return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing blank line before return statement

#[ORM\Index(name: 'course_rel_user_user_id', columns: ['id', 'user_id'])]
#[ORM\Index(name: 'course_rel_user_c_id_user_id', columns: ['id', 'c_id', 'user_id'])]
#[ORM\Entity]
#[ORM\Index(columns: ['id', 'user_id'], name: 'course_rel_user_user_id')]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Index(name: 'course_rel_user_c_id_user_id', columns: ['id', 'c_id', 'user_id'])]
#[ORM\Entity]
#[ORM\Index(columns: ['id', 'user_id'], name: 'course_rel_user_user_id')]
#[ORM\Index(columns: ['id', 'c_id', 'user_id'], name: 'course_rel_user_c_id_user_id')]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Entity]
#[ORM\Index(columns: ['id', 'user_id'], name: 'course_rel_user_user_id')]
#[ORM\Index(columns: ['id', 'c_id', 'user_id'], name: 'course_rel_user_c_id_user_id')]
#[ORM\Entity(repositoryClass: CourseRelUserRepository::class)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Index(columns: ['c_id'], name: 'idx_session_rel_course_rel_user_course_id')]
#[ORM\UniqueConstraint(name: 'course_session_unique', columns: ['session_id', 'c_id', 'user_id', 'status'])]
#[ORM\Entity]
#[ORM\Entity(repositoryClass: SessionRelCourseRelUserRepository::class)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Index(name: 'session', columns: ['session_id'])]
#[ORM\Index(name: 'idx_default_user_id', columns: ['default_user_id'])]
#[ORM\Entity]
#[ORM\Index(columns: ['c_id'], name: 'course')]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Index(name: 'idx_default_user_id', columns: ['default_user_id'])]
#[ORM\Entity]
#[ORM\Index(columns: ['c_id'], name: 'course')]
#[ORM\Index(columns: ['session_id'], name: 'session')]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

#[ORM\Entity]
#[ORM\Index(columns: ['c_id'], name: 'course')]
#[ORM\Index(columns: ['session_id'], name: 'session')]
#[ORM\Index(columns: ['default_user_id'], name: 'idx_default_user_id')]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

Copy link

Code Climate has analyzed commit a3e1121 and detected 42 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 33
Clarity 7
Complexity 2

View more on Code Climate.

@NicoDucou NicoDucou merged commit 5a6b213 into chamilo:master Nov 25, 2024
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants