-
Notifications
You must be signed in to change notification settings - Fork 487
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
Conversation
Code Climate has analyzed commit 1812b56 and detected 12 issues on this pull request. Here's the issue category breakdown:
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
No description provided.