Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 7, 2023
1 parent 9d29e3b commit 2a4d7c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Events/AuditableEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(Model $model)
if (app()->has(static::CONTAINER_KEY)) {
[$user, $action] = app()->get(static::CONTAINER_KEY);

$this->user = ! $action || $this->action === $action ? $user : null;
$this->user = !$action || $this->action === $action ? $user : null;
}

$this->user ??= Auth::user();
Expand Down
2 changes: 1 addition & 1 deletion tests/AuditableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function test_updated_by_uses_forced_user_only_when_action_sent()
$this->assertTrue($post->created_by === $this->user->id);
$this->assertNull($post->updated_by);
$this->assertNull($post->deleted_by);

$post->update(['title' => 'hello another']);

$this->assertTrue($post->updated_by === $this->anotherUser->id);
Expand Down

0 comments on commit 2a4d7c5

Please sign in to comment.