Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session: Fix duplicate entry error in session import - refs BT#22278 #5999

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

Copy link

codeclimate bot commented Dec 23, 2024

Code Climate has analyzed commit 1812b56 and detected 12 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 11
Clarity 1

View more on Code Climate.

session_id = '$session_id',
registered_at = '".api_get_utc_datetime()."'";
Database::query($sql);
$userEntity = api_get_user_entity($user_id);
Copy link

Choose a reason for hiding this comment

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

Variable "user_id" is not in valid camel caps format

registered_at = '".api_get_utc_datetime()."'";
Database::query($sql);
$userEntity = api_get_user_entity($user_id);
$sessionEntity = api_get_session_entity($session_id);
Copy link

Choose a reason for hiding this comment

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

Variable "session_id" is not in valid camel caps format

@@ -260,7 +260,7 @@ class Session implements ResourceWithAccessUrlInterface, Stringable
'session:write',
])]
#[ORM\Column(name: 'show_description', type: 'boolean', nullable: true)]
protected ?bool $showDescription;
protected ?bool $showDescription = false;
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 8 spaces, found 4

@@ -446,7 +446,7 @@

public function getShowDescription(): bool
{
return $this->showDescription;
return $this->showDescription ?? false;
Copy link

Choose a reason for hiding this comment

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

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

@@ -810,7 +810,18 @@

public function addUserInSession(int $relationType, User $user): self
{
$sessionRelUser = (new SessionRelUser())->setUser($user)->setRelationType($relationType);
foreach ($this->getUsers() as $existingSubscription) {
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 12 spaces, found 8

@NicoDucou NicoDucou merged commit 68360b8 into chamilo:master Dec 23, 2024
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants