Skip to content

Commit 00d5cab

Browse files
committed
updated comments
1 parent 7bf1b99 commit 00d5cab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Database/Eloquent/FMModel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,18 @@ public static function createFromRecord($record)
148148

149149
public static function createModelsFromRecordSet(BaseCollection $records): Collection
150150
{
151-
// return an empty Eloquent/Collection (or a collection of the specific model type) if an empty collection was
151+
// return an empty Eloquent/Collection (or the custom collection specified in the model) if an empty collection was
152152
// passed in.
153153
if ($records->count() === 0) {
154-
return (new static())->newCollection([]);
154+
return (new static())->newCollection();
155155
}
156156

157157
// Records passed in weren't empty, so process the records
158158
$mappedRecords = $records->map(function ($record) {
159159
return static::createFromRecord($record);
160160
});
161161

162-
// return the filled Eloquent/Collection (or a collection of the specific model type if possible)
162+
// return the filled Eloquent/Collection (or the custom collection specified in the model)
163163
return (new static())->newCollection($mappedRecords->all());
164164
}
165165

0 commit comments

Comments
 (0)