Skip to content

Oasin #40

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

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update InteractsWithTickets.php
  • Loading branch information
oasin authored Mar 31, 2023
commit 4a60c8f3a40b3906d5dfe959eafc643355ec7bb7
15 changes: 11 additions & 4 deletions src/Concerns/InteractsWithTickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function isOpen(): bool
*/
public function isClosed(): bool
{
return ! $this->isOpen();
return !$this->isOpen();
}

/**
Expand All @@ -81,7 +81,7 @@ public function isResolved(): bool
*/
public function isUnresolved(): bool
{
return ! $this->isResolved();
return !$this->isResolved();
}

/**
Expand All @@ -97,7 +97,7 @@ public function isLocked(): bool
*/
public function isUnlocked(): bool
{
return ! $this->isLocked();
return !$this->isLocked();
}

/**
Expand Down Expand Up @@ -190,8 +190,15 @@ public function reopenAsUnresolved(): self
*/
public function assignTo(Model|int $user): self
{

if ($user instanceof Model) {
$id = $user->getKey();
}else{
$id = $user->id;
}

$this->update([
'assigned_to' => $user,
'assigned_to' => $id,
]);

return $this;
Expand Down