chamilo/chamilo-lms

View on GitHub
src/CoreBundle/Entity/Session.php

Summary

Maintainability
A
0 mins
Test Coverage

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

#[ApiFilter(GroupFilter::class, arguments: ['parameterName' => 'groups'])]

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

    #[ORM\Id]

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

    #[ORM\OneToMany(

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

    #[Groups([

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

    #[Groups(['session:read'])]

You must use "/**" style comments for a class comment
Open

class Session implements ResourceWithAccessUrlInterface, Stringable

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

    #[ORM\Column(name: 'id', type: 'integer')]

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

    #[ORM\OrderBy(['position' => 'ASC'])]

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

    #[ORM\OneToMany(

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

    #[Groups([

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

    #[ORM\Column(name: 'visibility', type: 'integer')]

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

    #[ORM\JoinColumn(name: 'promotion_id', referencedColumnName: 'id', onDelete: 'CASCADE')]

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

    #[Groups([

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

    #[Groups([

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

    #[Groups(['session:read', 'session:write', 'session_rel_user:read', 'user_subscriptions:sessions'])]

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

    #[ORM\Column(name: 'description', type: 'text', unique: false, nullable: true)]

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

    #[ORM\Column(name: 'show_description', type: 'boolean', nullable: true)]

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

    #[Groups(['session:basic'])]

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

    #[ORM\Column(name: 'display_start_date', type: 'datetime', unique: false, nullable: true)]

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

    #[ORM\Column(name: 'display_end_date', type: 'datetime', unique: false, nullable: true)]

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

    #[ORM\JoinColumn(name: 'image_id', referencedColumnName: 'id', onDelete: 'SET NULL')]

Add a single space around assignment operators
Open

declare(strict_types=1);

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

    #[Assert\NotBlank]

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

    #[Groups([

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

    #[ORM\Column(name: 'title', type: 'string', length: 150)]

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

    #[Groups([

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

    #[ORM\Column(name: 'nbr_classes', type: 'integer', unique: false, nullable: false)]

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

    #[Groups([

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

#[ORM\Table(name: 'session')]

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

    #[ORM\OneToMany(

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

    #[ORM\Column(name: 'nbr_courses', type: 'integer', unique: false, nullable: false)]

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

    #[Groups([

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

    #[ORM\Column(name: 'coach_access_end_date', type: 'datetime', unique: false, nullable: true)]

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

#[ApiResource(

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

    #[ORM\OneToMany(mappedBy: 'session', targetEntity: SkillRelUser::class, cascade: ['persist'])]

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

    #[ORM\Column(name: 'nbr_users', type: 'integer', unique: false, nullable: false)]

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

    #[ORM\ManyToOne(targetEntity: SessionCategory::class, inversedBy: 'sessions')]

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

#[ORM\EntityListeners([SessionListener::class])]

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

#[ApiFilter(OrderFilter::class, properties: ['id', 'title'])]

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

    #[ORM\Column(name: 'duration', type: 'integer', nullable: true)]

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

    #[ORM\Column(name: 'access_end_date', type: 'datetime', unique: false, nullable: true)]

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

    #[ORM\GeneratedValue]

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

    #[ORM\OneToMany(mappedBy: 'session', targetEntity: ResourceLink::class, cascade: ['remove'], orphanRemoval: true)]

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

#[ORM\UniqueConstraint(name: 'title', columns: ['title'])]

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

#[ORM\Entity(repositoryClass: SessionRepository::class)]

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

    #[Groups([

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

    #[Groups([

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

#[ApiFilter(SearchFilter::class, properties: ['title' => 'partial'])]

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

    #[ORM\OneToMany(

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

    #[ORM\Column(name: 'access_start_date', type: 'datetime', unique: false, nullable: true)]

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

    #[ORM\Column(name: 'position', type: 'integer', nullable: false, options: ['default' => 0])]

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

#[UniqueEntity('title')]

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

#[ApiFilter(PropertyFilter::class)]

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

    #[ORM\ManyToOne(targetEntity: Asset::class, cascade: ['remove'])]

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

    #[Groups([

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

    #[Groups([

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

    #[ORM\OneToMany(

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

    #[Groups(['session:read', 'session:write', 'user_subscriptions:sessions'])]

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

    #[Groups(['session:read'])]

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

    #[ORM\Column(

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

    #[Groups(['user_subscriptions:sessions', 'session:read', 'session:item:read'])]

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

    #[Groups([

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

    #[ORM\ManyToOne(targetEntity: Promotion::class, cascade: ['persist'], inversedBy: 'sessions')]

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

    #[ORM\Column(name: 'coach_access_start_date', type: 'datetime', unique: false, nullable: true)]

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

    #[Groups(['user_subscriptions:sessions'])]

Missing function doc comment
Open

    public function addUserSubscription(SessionRelUser $subscription): void

Missing function doc comment
Open

    public function getShowDescription(): bool

Missing function doc comment
Open

    public function removeCourses(SessionRelCourse $course): void

Missing function doc comment
Open

    public static function getRelationTypeList(): array

Missing function doc comment
Open

    public function getId(): ?int

Missing function doc comment
Open

    public function setUsers(Collection $users): self

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

    #[ORM\Column(name: 'notify_boss', type: 'boolean', options: ['default' => false])]

Missing function doc comment
Open

    public function setShowDescription(bool $showDescription): self

Missing function doc comment
Open

    public static function getStatusList(): array

Missing function doc comment
Open

    public function hasCourse(Course $course): bool

Missing function doc comment
Open

    public function __toString(): string

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

    #[Groups([

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

    #[Groups(['session:basic', 'session:read', 'session:write'])]

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

    #[Groups(['session:basic', 'session:read', 'session:write'])]

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

    #[ORM\Column(name: 'status', type: 'integer', nullable: false)]

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

    #[ORM\JoinColumn(name: 'session_category_id', referencedColumnName: 'id')]

Missing function doc comment
Open

    public function setDuration(int $duration): self

Missing function doc comment
Open

    public function addCourses(SessionRelCourse $course): void

Missing function doc comment
Open

    public function setCourses(ArrayCollection $courses): void

Missing function doc comment
Open

    public function getDuration(): ?int

Missing function doc comment
Open

    public function hasUser(SessionRelUser $subscription): bool

Missing function doc comment
Open

    public function __construct()

Missing function doc comment
Open

    public function getStatus(): int

Missing function doc comment
Open

    public function setNbrUsers(int $nbrUsers): self

Missing function doc comment
Open

    public function getTitle(): string

Missing function doc comment
Open

    public function getNbrUsers(): int

Missing function doc comment
Open

    public function setVisibility(int $visibility): self

Missing function doc comment
Open

    public function getPromotion(): ?Promotion

Missing function doc comment
Open

    public function hasUserCourseSubscription(SessionRelCourseRelUser $subscription): bool

Missing function doc comment
Open

    public function getSessionRelCourseRelUsers(): Collection

Missing function doc comment
Open

    public function setDescription(string $description): self

Missing function doc comment
Open

    public function getNbrClasses(): int

Missing function doc comment
Open

    public function getVisibility(): int

Missing function doc comment
Open

    public function getCourseSubscription(Course $course): ?SessionRelCourse

Missing function doc comment
Open

    public function addSessionRelCourseRelUser(SessionRelCourseRelUser $sessionRelCourseRelUser): void

Missing function doc comment
Open

    public function setNbrCourses(int $nbrCourses): self

Missing function doc comment
Open

    public function setStatus(int $status): self

Missing function doc comment
Open

    public function getNbrCourses(): int

Missing function doc comment
Open

    public function getDescription(): ?string

Missing function doc comment
Open

    public function setNbrClasses(int $nbrClasses): self

Missing function doc comment
Open

    public function setTitle(string $title): self

Missing function doc comment
Open

    public function setSessionRelCourseRelUsers(Collection $sessionRelCourseRelUsers): self

Missing function doc comment
Open

    public function isActiveForCoach(): bool

Missing function doc comment
Open

    public function getAccessEndDate(): ?DateTime

Missing function doc comment
Open

    public function setCoachAccessStartDate(?DateTime $coachAccessStartDate): self

Missing function doc comment
Open

    public function addUserInSession(int $relationType, User $user): self

Missing function doc comment
Open

    public function removeUserSubscription(SessionRelUser $subscription): self

Missing function doc comment
Open

    public function getDisplayEndDate(): ?DateTime

Space before opening parenthesis of function call prohibited
Open

            ->map(fn (SessionRelUser $subscription) => $subscription->getUser())

Missing function doc comment
Open

    public function setAccessEndDate(?DateTime $accessEndDate): self

Missing function doc comment
Open

    public function setCategory(?SessionCategory $category): self

You must use "/**" style comments for a function comment
Open

    public function getGeneralCoachesSubscriptions(): Collection

Missing function doc comment
Open

    public function removeUserInSession(int $relationType, User $user): self

Missing function doc comment
Open

    public function hasUserAsGeneralCoach(User $user): bool

Missing function doc comment
Open

    public function addGeneralCoach(User $coach): self

Missing function doc comment
Open

    public function removeGeneralCoach(User $user): self

Missing function doc comment
Open

    public function isActiveForStudent(): bool

Missing function doc comment
Open

    public function setDisplayStartDate(?DateTime $displayStartDate): self

Missing function doc comment
Open

    public function setDisplayEndDate(?DateTime $displayEndDate): self

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

    #[Groups(['session:basic', 'user_subscriptions:sessions'])]

Missing function doc comment
Open

    public function setPromotion(?Promotion $promotion): self

Missing function doc comment
Open

    public function getCategory(): ?SessionCategory

Missing function doc comment
Open

    public function getCoachAccessStartDate(): ?DateTime

Missing function doc comment
Open

    public function getDisplayStartDate(): ?DateTime

Missing function doc comment
Open

    public function getAccessStartDate(): ?DateTime

Missing function doc comment
Open

    public function setAccessStartDate(?DateTime $accessStartDate): self

Space before opening parenthesis of function call prohibited
Open

                fn ($key, $element) => $course->getId() === $element->getCourse()->getId()

Missing function doc comment
Open

    public function getSendSubscriptionNotification(): bool

Missing function doc comment
Open

    public function addAccessUrl(?AccessUrl $url): self

Missing function doc comment
Open

    public function addCourse(Course $course): self

Missing function doc comment
Open

    public function addUrls(AccessUrlRelSession $url): self

Missing function doc comment
Open

    public function setCurrentUrl(AccessUrl $url): self

Missing function doc comment
Open

    public function getCoachAccessEndDate(): ?DateTime

Missing function doc comment
Open

    public function getPosition(): int

Missing function doc comment
Open

    public function setCoachAccessEndDate(?DateTime $coachAccessEndDate): self

Missing function doc comment
Open

    public function setPosition(int $position): self

Missing function doc comment
Open

    public function getCurrentUrl(): AccessUrl

Missing function doc comment
Open

    public function getSessionRelCourseRelUserInCourse(Course $course): Collection

Missing function doc comment
Open

    public function setSendSubscriptionNotification(bool $sendNotification): self

Missing function doc comment
Open

    public function setUrls(Collection $urls): self

Missing function doc comment
Open

    public function getSessionAdmins(): ReadableCollection

Missing function doc comment
Open

    public function getIssuedSkills(): Collection

Missing function doc comment
Open

    public function hasUserAsSessionAdmin(User $user): bool

You must use "/**" style comments for a function comment
Open

    public function getCourseCoachesSubscriptions(): Collection

Missing function doc comment
Open

    public function getGeneralAdminsSubscriptions(): Collection

Missing function doc comment
Open

    public function getResourceLinks(): Collection

Space before opening parenthesis of function call prohibited
Open

            ->map(fn (SessionRelCourseRelUser $subscription) => $subscription->getUser())

Missing function doc comment
Open

    public function getImageUrl(): ?string

Space before opening parenthesis of function call prohibited
Open

            ->map(fn (SessionRelUser $subscription) => $subscription->getUser())

Missing function doc comment
Open

    public function getSkills(): Collection

Missing function doc comment
Open

    public function addSessionAdmin(User $sessionAdmin): self

Missing function doc comment
Open

    public function hasImage(): bool

Declare public methods first,then protected ones and finally private ones
Open

    public function getCourseCoaches(): Collection

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

    #[Groups(['session:basic', 'user_subscriptions:sessions'])]

Missing function doc comment
Open

    public function setImage(?Asset $asset): self

Doc comment for parameter $status does not match actual variable name $user
Open

     * @param int $status if not set it will check if the user is registered

Missing function doc comment
Open

    public function getUserInCourse(User $user, Course $course, ?int $status = null): Collection

Missing function doc comment
Open

    public function hasStudentInCourse(User $user, Course $course): bool

Missing function doc comment
Open

    public function setImageUrl(?string $imageUrl): self

Missing function doc comment
Open

    public function getImage(): ?Asset

Missing function doc comment
Open

    public function hasCourseCoachInCourse(User $user, ?Course $course = null): bool

Missing function doc comment
Open

    public function isAvailableByDurationForUser(User $user): bool

Declare public methods first,then protected ones and finally private ones
Open

    public function hasCoach(User $user): bool

Missing function doc comment
Open

    public function getClosedOrHiddenCourses(): Collection

Missing function doc comment
Open

    public function setAccessVisibilityByUser(User $user, bool $ignoreVisibilityForAdmins = true): int

Missing function doc comment
Open

    public function getNotifyBoss(): bool

Missing function doc comment
Open

    public function setNotifyBoss(bool $notifyBoss): self

Declare public methods first,then protected ones and finally private ones
Open

    public function setAccessVisibilityByUser(User $user, bool $ignoreVisibilityForAdmins = true): int

Space before opening parenthesis of function call prohibited
Open

        return $this->courses->filter(fn (SessionRelCourse $sessionRelCourse) => \in_array(

Missing function doc comment
Open

    public function getDaysLeftByUser(User $user): int

Missing function doc comment
Open

    public function getAccessVisibility(): int

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const COURSE_COACH = 2;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    )]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $resourceLinks;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $nbrCourses;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?DateTime $coachAccessStartDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?Asset $image = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const STATUS_PROGRESS = 2;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $sessionRelCourseRelUsers;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $nbrUsers;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const DRH = 1;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $urls;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $nbrClasses;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?DateTime $coachAccessEndDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $position;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    )]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected bool $sendSubscriptionNotification;

Line indented incorrectly; expected 8 spaces, found 4
Open

    private ?string $imageUrl = null;

Line indented incorrectly; expected at least 4 spaces, found 0
Open

)]

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const READ_ONLY = 1;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const LIST_ONLY = 5;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const STATUS_CANCELLED = 4;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const STATUS_UNKNOWN = 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $id = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected AccessUrl $currentUrl;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?DateTime $accessStartDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const INVISIBLE = 3;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const AVAILABLE = 4;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $users;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?Course $currentCourse = null;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?bool $showDescription;

Line indented incorrectly; expected 4 spaces, found 0
Open

class Session implements ResourceWithAccessUrlInterface, Stringable

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?string $description;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?int $duration = null;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $skills;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    )]

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const STUDENT = 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $issuedSkills;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    )]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected string $title;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?SessionCategory $category = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const GENERAL_COACH = 3;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const SESSION_ADMIN = 4;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected Collection $courses;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    )]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?DateTime $displayEndDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const VISIBLE = 2;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const STATUS_PLANNED = 1;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public const STATUS_FINISHED = 3;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $visibility;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?Promotion $promotion = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?DateTime $displayStartDate;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->urls = new ArrayCollection();

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function __toString(): string

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->users->add($subscription);

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                )

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return false;

Line indented incorrectly; expected 16 spaces, found 12
Open

            }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->accessStartDate = $now;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getShowDescription(): bool

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setShowDescription(bool $showDescription): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addUserSubscription(SessionRelUser $subscription): void

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (0 !== $this->getUsers()->count()) {

Line indented incorrectly; expected at least 20 spaces, found 12
Open

            return $relation->count() > 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCourses(ArrayCollection $courses): void

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->resourceLinks = new ArrayCollection();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->showDescription = false;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->nbrUsers++;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->id;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->nbrCourses = 0;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->addUserSubscription($user);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (!$this->hasUser($subscription)) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $criteria = Criteria::create()

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->users = new ArrayCollection();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->displayStartDate = $now;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return [

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->showDescription;

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                )

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->description = '';

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->sendSubscriptionNotification = false;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->accessEndDate = $now;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->duration = $duration;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->users = new ArrayCollection();

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $relation = $this->getCourses()->matching($criteria);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $course->setSession($this);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->courses->add($course);

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected bool $notifyBoss = false;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getDuration(): ?int

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasUser(SessionRelUser $subscription): bool

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                ->andWhere(

Line indented incorrectly; expected at least 20 spaces, found 12
Open

            ;

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($this->courses as $key => $value) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    private int $accessVisibility = 0;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->getTitle();

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getUsers(): Collection

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->users;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setUsers(Collection $users): self

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($users as $user) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $criteria = Criteria::create()->where(Criteria::expr()->eq('course', $course));

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->addCourses($course);

Line indented incorrectly; expected 16 spaces, found 12
Open

            if ($value->getId() === $course->getId()) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->position = 0;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->showDescription = $showDescription;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $subscription->setSession($this);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 4 spaces, found 0
Open

{

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    )]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ])]

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected ?DateTime $accessEndDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected int $status;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->sessionRelCourseRelUsers = new ArrayCollection();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->coachAccessStartDate = $now;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->nbrClasses = 0;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->status = 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public static function getRelationTypeList(): array

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ];

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addCourses(SessionRelCourse $course): void

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function __construct()

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->issuedSkills = new ArrayCollection();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->coachAccessEndDate = $now;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->duration;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return $relation->count() > 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCourses(): Collection

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->courses = new ArrayCollection();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($courses as $course) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getId(): ?int

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->skills = new ArrayCollection();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->duration = 0;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->visibility = 1;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 20 spaces, found 12
Open

            $relation = $this->getUsers()->matching($criteria);

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->courses;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function removeCourses(SessionRelCourse $course): void

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->nbrUsers = 0;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->displayEndDate = $now;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->category = null;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                ->andWhere(

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                )

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (0 !== $this->getCourses()->count()) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return false;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->courses = new ArrayCollection();

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                unset($this->courses[$key]);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $now = new DateTime();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return [self::STUDENT, self::DRH, self::COURSE_COACH, self::GENERAL_COACH, self::SESSION_ADMIN];

Line indented incorrectly; expected 8 spaces, found 4
Open

    public static function getStatusList(): array

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setDuration(int $duration): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasCourse(Course $course): bool

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->title = $title;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSessionRelCourseRelUsers(): Collection

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                ->andWhere(

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()->where(Criteria::expr()->eq('user', $user));

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->nbrCourses = $nbrCourses;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 16 spaces, found 12
Open

            }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->nbrUsers;

Line indented incorrectly; expected at least 20 spaces, found 12
Open

            ;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getPromotion(): ?Promotion

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->getSessionRelCourseRelUsers()->matching($criteria);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (null !== $status) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->status;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setTitle(string $title): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->sessionRelCourseRelUsers = new ArrayCollection();

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->nbrCourses;

Line indented incorrectly; expected at least 28 spaces, found 20
Open

                    $sessionCourse->setNbrUsers($sessionCourse->getNbrUsers() - 1);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setStatus(int $status): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->status = $status;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->courses->matching($criteria)->current();

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getNbrUsers(): int

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setNbrUsers(int $nbrUsers): self

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->addSessionRelCourseRelUser($item);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addSessionRelCourseRelUser(SessionRelCourseRelUser $sessionRelCourseRelUser): void

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                )

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setNbrClasses(int $nbrClasses): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 28 spaces, found 20
Open

                    $sessionCourse = $this->getCourseSubscription($course);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getAllUsersFromCourse(int $status): Collection

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()->where(Criteria::expr()->eq('status', $status));

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setSessionRelCourseRelUsers(Collection $sessionRelCourseRelUsers): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasUserCourseSubscription(SessionRelCourseRelUser $subscription): bool

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                )

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($this->sessionRelCourseRelUsers as $i => $sessionRelUser) {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSessionRelCourseByUser(User $user, ?int $status = null): Collection

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->sessionRelCourseRelUsers->matching($criteria);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getDescription(): ?string

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->nbrClasses;

Line indented incorrectly; expected 16 spaces, found 12
Open

            if ($sessionRelUser->getCourse()->getId() === $course->getId()

Line indented incorrectly; expected 24 spaces, found 16
Open

                }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCourseSubscription(Course $course): ?SessionRelCourse

Line indented incorrectly; expected at least 20 spaces, found 12
Open

            return $relation->count() > 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setDescription(string $description): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->description = $description;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getNbrCourses(): int

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setNbrCourses(int $nbrCourses): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getTitle(): string

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 20 spaces, found 12
Open

            $relation = $this->getSessionRelCourseRelUsers()->matching($criteria);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->visibility = $visibility;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getStatus(): int

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->sessionRelCourseRelUsers;

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                ->andWhere(

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getNbrClasses(): int

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function removeUserCourseSubscription(User $user, Course $course): void

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->sessionRelCourseRelUsers->add($sessionRelCourseRelUser);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (!$this->hasUserCourseSubscription($sessionRelCourseRelUser)) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return false;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 24 spaces, found 16
Open

                unset($this->sessionRelCourseRelUsers[$i]);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()->where(Criteria::expr()->eq('course', $course));

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->nbrUsers = $nbrUsers;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                )

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->nbrClasses = $nbrClasses;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setVisibility(int $visibility): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->title;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $criteria->andWhere(Criteria::expr()->eq('status', $status));

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 24 spaces, found 16
Open

                if (self::STUDENT === $this->sessionRelCourseRelUsers[$i]->getStatus()) {

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (0 !== $this->getSessionRelCourseRelUsers()->count()) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $criteria = Criteria::create()

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->description;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getVisibility(): int

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->visibility;

Line indented incorrectly; expected at least 20 spaces, found 12
Open

            ) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($sessionRelCourseRelUsers as $item) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $sessionRelCourseRelUser->setSession($this);

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $subscription->setSession(null);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $start = $this->getAccessStartDate();

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->users->matching($criteria)->count() > 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $end = $this->getCoachAccessEndDate();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->promotion = $promotion;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $start = $this->getCoachAccessStartDate();

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getDisplayStartDate(): ?DateTime

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getGeneralCoachesSubscriptions(): Collection

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()->where(Criteria::expr()->eq('relationType', self::GENERAL_COACH));

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()

Line indented incorrectly; expected 12 spaces, found 8
Open

        if ($this->hasUser($subscription)) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getAccessEndDate(): ?DateTime

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->accessEndDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setPromotion(?Promotion $promotion): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->users->matching($criteria);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCategory(): ?SessionCategory

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function isActiveForCoach(): bool

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->displayEndDate = $displayEndDate;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->addUserSubscription($sessionRelUser);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->compareDates($start, $end);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasUserAsGeneralCoach(User $user): bool

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function isActive(): bool

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $end = $this->getAccessEndDate();

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getDisplayEndDate(): ?DateTime

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->displayEndDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setDisplayEndDate(?DateTime $displayEndDate): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->getGeneralCoachesSubscriptions()

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addGeneralCoach(User $coach): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function removeUserInSession(int $relationType, User $user): self

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($subscriptions as $subscription) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->accessStartDate = $accessStartDate;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->compareDates($start, $end);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->accessEndDate = $accessEndDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->category = $category;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->displayStartDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setDisplayStartDate(?DateTime $displayStartDate): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addUserInSession(int $relationType, User $user): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $sessionRelUser = (new SessionRelUser())->setUser($user)->setRelationType($relationType);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $subscriptions = $this->users->matching($criteria);

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->category;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCategory(?SessionCategory $category): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function removeGeneralCoach(User $user): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->removeUserInSession(self::GENERAL_COACH, $user);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setAccessEndDate(?DateTime $accessEndDate): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->promotion;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->removeUserSubscription($subscription);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $now > $this->getAccessStartDate();

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCoachAccessStartDate(): ?DateTime

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCoachAccessStartDate(?DateTime $coachAccessStartDate): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getGeneralCoaches(): Collection

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function removeUserSubscription(SessionRelUser $subscription): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getAccessStartDate(): ?DateTime

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setAccessStartDate(?DateTime $accessStartDate): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->addUserInSession(self::GENERAL_COACH, $coach);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->nbrUsers--;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->coachAccessStartDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->displayStartDate = $displayStartDate;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Space before opening parenthesis of function call prohibited
Open

            ->map(fn (SessionRelUser $subscription) => $subscription->getUser())

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->users->removeElement($subscription);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $now = new DateTime('now');

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->accessStartDate;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function isActiveForStudent(): bool

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function isCurrentlyAccessible(): bool

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return true;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->currentCourse = $course;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->urls;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->coachAccessEndDate = $coachAccessEndDate;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->issuedSkills;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setUrls(Collection $urls): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addUserInCourse(int $status, User $user, Course $course): SessionRelCourseRelUser

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSessionRelCourseRelUsersByStatus(Course $course, int $status): Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getUrls(): Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getPosition(): int

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $sessionRelCourse = (new SessionRelCourse())->setCourse($course);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $urlList = $this->getUrls();

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                break;

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->coachAccessEndDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->setNbrCourses(\count($this->courses));

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $sessionCourse = $this->getCourseSubscription($course);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->sessionRelCourseRelUsers->matching($criteria);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->addUrls($accessUrlRelSession);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCoachAccessEndDate(): ?DateTime

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function removeCourse(Course $course): bool

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $relCourse = $this->getCourseSubscription($course);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCurrentCourse(): ?Course

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSendSubscriptionNotification(): bool

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                $this->currentUrl = $url;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addAccessUrl(?AccessUrl $url): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $accessUrlRelSession = new AccessUrlRelSession();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $accessUrlRelSession->setUrl($url);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->currentCourse;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $accessUrlRelSession->setSession($this);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $now = new DateTime();

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->sendSubscriptionNotification = $sendNotification;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->urls = new ArrayCollection();

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSessionAdmins(): ReadableCollection

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $sessionCourse->setNbrUsers($sessionCourse->getNbrUsers() + 1);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $userRelCourseRelSession;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCurrentCourse(Course $course): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->currentUrl;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addCourse(Course $course): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->addCourses($sessionRelCourse);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->addSessionRelCourseRelUser($userRelCourseRelSession);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->coachAccessStartDate = $coachAccessStartDate;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCoachAccessEndDate(?DateTime $coachAccessEndDate): self

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (self::STUDENT === $status) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $exists = $this->getCourses()

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (null !== $relCourse) {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setSendSubscriptionNotification(bool $sendNotification): self

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getIssuedSkills(): Collection

Line indented incorrectly; expected 16 spaces, found 12
Open

            }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return (!$this->accessStartDate || $now >= $this->accessStartDate) && (!$this->accessEndDate || $now <= $this->accessEndDate);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return false;

Line indented incorrectly; expected 12 spaces, found 8
Open

        if ($exists) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setPosition(int $position): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->position = $position;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Space before opening parenthesis of function call prohibited
Open

                fn ($key, $element) => $course->getId() === $element->getCourse()->getId()

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->sendSubscriptionNotification;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSessionRelCourseRelUserInCourse(Course $course): Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setCurrentUrl(AccessUrl $url): self

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($urlList as $item) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->addUrls($url);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $url->setSession($this);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->urls->add($url);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->position;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->courses->removeElement($relCourse);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $userRelCourseRelSession = (new SessionRelCourseRelUser())

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->sessionRelCourseRelUsers->matching($criteria);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCurrentUrl(): AccessUrl

Line indented incorrectly; expected 16 spaces, found 12
Open

            if ($item->getUrl()->getId() === $url->getId()) {

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($urls as $url) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addUrls(AccessUrlRelSession $url): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $filename = $image->getTitle();

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->getSessionRelCourseRelUsers()->matching($criteria);

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $firstAccess = $trackECourseAccess

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->image = $asset;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (!empty($start) && !empty($end)) {

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (!empty($start)) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCourseCoachesSubscriptions(): Collection

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $trackECourseAccess = $user->getFirstAccessToSession($this);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()->where(Criteria::expr()->eq('relationType', self::SESSION_ADMIN));

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->addUserInSession(self::SESSION_ADMIN, $sessionAdmin);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return false;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $relation->count() > 0;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($this->courses as $sessionCourse) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return $now >= $start;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->users->matching($criteria)->count() > 0;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasCoachInCourseList(User $user): bool

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $relation = $this->getUserInCourse($user, $course, $status);

Line indented incorrectly; expected 16 spaces, found 12
Open

            if ($this->hasStudentInCourse($user, $sessionCourse->getCourse())) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->getCourseCoachesSubscriptions()

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getGeneralAdminsSubscriptions(): Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->resourceLinks;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->imageUrl = $imageUrl;

Line indented incorrectly; expected 16 spaces, found 12
Open

            }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return !empty($end) && $now <= $end;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->getAllUsersFromCourse(self::COURSE_COACH);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function isAvailableByDurationForUser(User $user): bool

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasUserAsSessionAdmin(User $user): bool

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function addSessionAdmin(User $sessionAdmin): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return null !== $this->image;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 16 spaces, found 12
Open

            }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getSkills(): Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setImage(?Asset $asset): self

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setImageUrl(?string $imageUrl): self

Line indented incorrectly; expected 12 spaces, found 8
Open

        if ($image instanceof Asset) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return \sprintf('/assets/%s/%s/%s', $category, $filename, $filename);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return null;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                return true;

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (null === $course) {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->hasUserInCourse($user, $course, self::STUDENT);

Line indented incorrectly; expected 8 spaces, found 4
Open

    protected function compareDates(?DateTime $start, ?DateTime $end = null): bool

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->image;

Line indented incorrectly; expected 12 spaces, found 8
Open

        foreach ($this->courses as $sessionCourse) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return false;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $criteria->andWhere(Criteria::expr()->eq('status', $status));

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasStudentInCourseList(User $user): bool

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getCourseCoaches(): Collection

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->getGeneralAdminsSubscriptions()

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $criteria = Criteria::create()

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getImage(): ?Asset

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getImageUrl(): ?string

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasUserInCourse(User $user, Course $course, ?int $status = null): bool

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                return true;

Space before opening parenthesis of function call prohibited
Open

            ->map(fn (SessionRelCourseRelUser $subscription) => $subscription->getUser())

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->users->matching($criteria);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasImage(): bool

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $image = $this->getImage();

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasCourseCoachInCourse(User $user, ?Course $course = null): bool

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getUserInCourse(User $user, Course $course, ?int $status = null): Collection

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (null !== $status) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return false;

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasStudentInCourse(User $user, Course $course): bool

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $now = new DateTime('now');

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Space before opening parenthesis of function call prohibited
Open

            ->map(fn (SessionRelUser $subscription) => $subscription->getUser())

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $category = $image->getCategory();

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->hasUserInCourse($user, $course, self::COURSE_COACH);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return $now >= $start && $now <= $end;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return true;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $userDuration = $userDurationData

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->skills;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 16 spaces, found 12
Open

            if ($this->hasCourseCoachInCourse($user, $sessionCourse->getCourse())) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $duration = $this->duration * 24 * 60 * 60;

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (0 === $user->getTrackECourseAccess()->count()) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $userDurationData = $user->getSubscriptionToSession($this);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getResourceLinks(): Collection

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $userIsCoach = $this->hasCoach($user);

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (!$userIsCoach && $this->accessStartDate && $now < $this->accessStartDate) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getClosedOrHiddenCourses(): Collection

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $userDuration = $userSessionSubscription

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->hasUserAsGeneralCoach($user) || $this->hasCoachInCourseList($user);

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getDaysLeftByUser(User $user): int

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return $duration;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return (int) round(($endDateInSeconds - $currentTime) / 60 / 60 / 24);

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $duration = $this->getDuration() * 24 * 60 * 60;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->accessVisibility = self::AVAILABLE;

Line indented incorrectly; expected 12 spaces, found 8
Open

        } elseif (!$this->getAccessStartDate() && !$this->getAccessEndDate()) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $currentTime = time();

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (!$courseAccess) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $currentTime = time();

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $userSessionSubscription = $user->getSubscriptionToSession($this);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function hasCoach(User $user): bool

Line indented incorrectly; expected 12 spaces, found 8
Open

        if ($sessionEndDate) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setNotifyBoss(bool $notifyBoss): self

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $this->notifyBoss = $notifyBoss;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                return self::AVAILABLE;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return $now <= $sessionEndDate ? self::AVAILABLE : $this->visibility;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            throw new LogicException('Access visibility by user is not set');

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ];

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $courseAccess = $user->getFirstAccessToSession($this);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->accessVisibility;

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $duration += $userSessionSubscription->getDuration();

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $totalDuration = $firstAccess + $duration + $userDuration;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return $totalDuration > $currentTime ? self::AVAILABLE : $this->visibility;

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            return self::LIST_ONLY;

Line indented incorrectly; expected 12 spaces, found 8
Open

        } else {

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        ));

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $totalDuration > $currentTime;

Line indented incorrectly; expected 16 spaces, found 12
Open

            if ($this->hasCoach($user)) {

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $firstAccess = $courseAccess->getLoginCourseDate()->getTimestamp();

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (($user->isAdmin() || $user->isSuperAdmin()) && $ignoreVisibilityForAdmins) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getNotifyBoss(): bool

Line indented incorrectly; expected 4 spaces, found 0
Open

}

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $totalDuration = $firstAccess + $duration + $userDuration;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return self::AVAILABLE;

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if (0 === $this->accessVisibility) {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->courses->filter(fn (SessionRelCourse $sessionRelCourse) => \in_array(

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 8
Open

        if ($this->getDuration() > 0) {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $closedVisibilities = [

Line indented incorrectly; expected 12 spaces, found 8
Open

        if ($userSessionSubscription) {

Line indented incorrectly; expected at least 20 spaces, found 16
Open

                return self::AVAILABLE;

Line indented incorrectly; expected 12 spaces, found 8
Open

        }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return self::AVAILABLE;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->notifyBoss;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $duration = $this->duration;

Line indented incorrectly; expected 16 spaces, found 12
Open

            }

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->accessVisibility = $this->getAccessVisibilityByDuration($user);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $courseAccess = $user->getFirstAccessToSession($this);

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $currentTime = time();

Line indented incorrectly; expected 8 spaces, found 4
Open

    private function getAccessVisibilityByDuration(User $user): int

Line indented incorrectly; expected 16 spaces, found 12
Open

            }

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $now = new DateTime();

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $endDateInSeconds = $courseAccess->getLoginCourseDate()->getTimestamp() + $duration * 24 * 60 * 60;

Line indented incorrectly; expected 16 spaces, found 12
Open

            if (!$courseAccess) {

Line indented incorrectly; expected 8 spaces, found 4
Open

    private function getAcessVisibilityByDates(User $user): int

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $sessionEndDate = $userIsCoach && $this->coachAccessEndDate

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function setAccessVisibilityByUser(User $user, bool $ignoreVisibilityForAdmins = true): int

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        return $this->accessVisibility;

Line indented incorrectly; expected at least 12 spaces, found 8
Open

        $userSessionSubscription = $user->getSubscriptionToSession($this);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    {

Line indented incorrectly; expected 8 spaces, found 4
Open

    }

Line indented incorrectly; expected at least 16 spaces, found 12
Open

            $this->accessVisibility = $this->getAcessVisibilityByDates($user);

Line indented incorrectly; expected 8 spaces, found 4
Open

    public function getAccessVisibility(): int

Space before opening parenthesis of function call prohibited
Open

        return $this->courses->filter(fn (SessionRelCourse $sessionRelCourse) => \in_array(

There are no issues that match your filters.

Category
Status