Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 1 addition & 3 deletions tests/Models/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ public function changes(): Collection
return new Collection();
}

return collect(array_filter($this->properties->toArray(), function ($key) {
return in_array($key, ['attributes', 'old']);
}, ARRAY_FILTER_USE_KEY));
return $this->properties->only(['attributes', 'old']);
}

public function scopeInLog(Builder $query, ...$logNames): Builder
Expand Down
4 changes: 1 addition & 3 deletions tests/Models/AnotherInvalidActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ public function changes(): Collection
return new Collection();
}

return collect(array_filter($this->properties->toArray(), function ($key) {
return in_array($key, ['attributes', 'old']);
}, ARRAY_FILTER_USE_KEY));
return $this->properties->only(['attributes', 'old']);
}

public function scopeInLog(Builder $query, ...$logNames): Builder
Expand Down