Skip to content

Commit 1472088

Browse files
removing the middleman to simplify the call stack. (#54216)
1 parent 206700a commit 1472088

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Illuminate/Cache/RedisStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ protected function currentTags($chunkSize = 1000)
313313

314314
$prefix = $connectionPrefix.$this->getPrefix();
315315

316-
return LazyCollection::make(function () use ($connection, $chunkSize, $prefix, $defaultCursorValue) {
316+
return (new LazyCollection(function () use ($connection, $chunkSize, $prefix, $defaultCursorValue) {
317317
$cursor = $defaultCursorValue;
318318

319319
do {
@@ -336,7 +336,7 @@ protected function currentTags($chunkSize = 1000)
336336
yield $tag;
337337
}
338338
} while (((string) $cursor) !== $defaultCursorValue);
339-
})->map(fn (string $tagKey) => Str::match('/^'.preg_quote($prefix, '/').'tag:(.*):entries$/', $tagKey));
339+
}))->map(fn (string $tagKey) => Str::match('/^'.preg_quote($prefix, '/').'tag:(.*):entries$/', $tagKey));
340340
}
341341

342342
/**

src/Illuminate/Cache/RedisTagSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function entries()
4343
default => '0',
4444
};
4545

46-
return LazyCollection::make(function () use ($connection, $defaultCursorValue) {
46+
return new LazyCollection(function () use ($connection, $defaultCursorValue) {
4747
foreach ($this->tagIds() as $tagKey) {
4848
$cursor = $defaultCursorValue;
4949

src/Illuminate/Database/Concerns/BuildsQueries.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function lazy($chunkSize = 1000)
236236

237237
$this->enforceOrderBy();
238238

239-
return LazyCollection::make(function () use ($chunkSize) {
239+
return new LazyCollection(function () use ($chunkSize) {
240240
$page = 1;
241241

242242
while (true) {
@@ -304,7 +304,7 @@ protected function orderedLazyById($chunkSize = 1000, $column = null, $alias = n
304304

305305
$alias ??= $column;
306306

307-
return LazyCollection::make(function () use ($chunkSize, $column, $alias, $descending) {
307+
return new LazyCollection(function () use ($chunkSize, $column, $alias, $descending) {
308308
$lastId = null;
309309

310310
while (true) {

src/Illuminate/Filesystem/Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function lines($path)
168168
);
169169
}
170170

171-
return LazyCollection::make(function () use ($path) {
171+
return new LazyCollection(function () use ($path) {
172172
$file = new SplFileObject($path);
173173

174174
$file->setFlags(SplFileObject::DROP_NEW_LINE);

0 commit comments

Comments
 (0)