@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | $books = (new Book) |
| 112 | 112 | ->with('author') |
| 113 | - ->whereHas('author', function ($query) { |
|
| 113 | + ->whereHas('author', function($query) { |
|
| 114 | 114 | $query->whereId('1'); |
| 115 | 115 | }) |
| 116 | 116 | ->get(); |
@@ -134,14 +134,14 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | $books1 = (new Book) |
| 136 | 136 | ->with('author') |
| 137 | - ->whereHas('author', function ($query) { |
|
| 137 | + ->whereHas('author', function($query) { |
|
| 138 | 138 | $query->whereId(1); |
| 139 | 139 | }) |
| 140 | 140 | ->get() |
| 141 | 141 | ->keyBy('id'); |
| 142 | 142 | $books2 = (new Book) |
| 143 | 143 | ->with('author') |
| 144 | - ->whereHas('author', function ($query) { |
|
| 144 | + ->whereHas('author', function($query) { |
|
| 145 | 145 | $query->whereId(2); |
| 146 | 146 | }) |
| 147 | 147 | ->get() |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesbook" |
| 49 | 49 | ]) |
| 50 | 50 | ->get(sha1( |
| 51 | - "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor_1_2_3_4_5_6_" . |
|
| 51 | + "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor_1_2_3_4_5_6_". |
|
| 52 | 52 | "7_8_9_10-genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesbooks" |
| 53 | 53 | )); |
| 54 | 54 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesbook" |
| 67 | 67 | ]) |
| 68 | 68 | ->get(sha1( |
| 69 | - "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor_1_2_3_4_5_6_" . |
|
| 69 | + "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor_1_2_3_4_5_6_". |
|
| 70 | 70 | "7_8_9_10-genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesbooks" |
| 71 | 71 | )); |
| 72 | 72 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesbook" |
| 84 | 84 | ]) |
| 85 | 85 | ->get(sha1( |
| 86 | - "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor_1_2_3_4_5_6_" . |
|
| 86 | + "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor_1_2_3_4_5_6_". |
|
| 87 | 87 | "7_8_9_10-genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesbooks" |
| 88 | 88 | )); |
| 89 | 89 | |
@@ -186,11 +186,11 @@ discard block |
||
| 186 | 186 | $chunkedKeys = []; |
| 187 | 187 | $tags = ["genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesauthor"]; |
| 188 | 188 | (new Author) |
| 189 | - ->chunk(3, function ($authors) use (&$chunkedAuthors, &$chunkedKeys) { |
|
| 189 | + ->chunk(3, function($authors) use (&$chunkedAuthors, &$chunkedKeys) { |
|
| 190 | 190 | $offset = ""; |
| 191 | 191 | |
| 192 | 192 | if (count($chunkedKeys)) { |
| 193 | - $offset = "-offset_" . (count($chunkedKeys) * 3); |
|
| 193 | + $offset = "-offset_".(count($chunkedKeys) * 3); |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | $key = "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-authors.deleted_at_null_orderBy_authors.id_asc{$offset}-limit_3"; |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | ->tags($tags1) |
| 664 | 664 | ->rememberForever( |
| 665 | 665 | $key1, |
| 666 | - function () use ($key2, $authors) { |
|
| 666 | + function() use ($key2, $authors) { |
|
| 667 | 667 | return [ |
| 668 | 668 | 'key' => $key2, |
| 669 | 669 | 'value' => $authors, |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $authors = (new Author)->with('books', 'profile') |
| 52 | 52 | ->disableCache() |
| 53 | - ->chunk($chunkSize, function ($chunk) use (&$cachedChunks, $chunkSize) { |
|
| 53 | + ->chunk($chunkSize, function($chunk) use (&$cachedChunks, $chunkSize) { |
|
| 54 | 54 | $offset = ''; |
| 55 | 55 | |
| 56 | 56 | if ($cachedChunks['authors']->count()) { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | }); |
| 66 | 66 | |
| 67 | 67 | $liveResults = (new UncachedAuthor)->with('books', 'profile') |
| 68 | - ->chunk($chunkSize, function ($chunk) use (&$uncachedChunks) { |
|
| 68 | + ->chunk($chunkSize, function($chunk) use (&$uncachedChunks) { |
|
| 69 | 69 | $uncachedChunks->push($chunk); |
| 70 | 70 | }); |
| 71 | 71 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** @var Collection $publishers */ |
| 20 | 20 | $publishers = factory(UncachedPublisher::class, 5)->create(); |
| 21 | 21 | |
| 22 | - $publishers->each(function (UncachedPublisher $publisher) { |
|
| 22 | + $publishers->each(function(UncachedPublisher $publisher) { |
|
| 23 | 23 | factory(UncachedBook::class, 2)->create(['publisher_id' => $publisher->id]); |
| 24 | 24 | }); |
| 25 | 25 | |