@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesbook", |
| 61 | 61 | ]; |
| 62 | 62 | $results = (new Book) |
| 63 | - ->whereNotIn("id", function ($query) { |
|
| 63 | + ->whereNotIn("id", function($query) { |
|
| 64 | 64 | $query->select("id")->from("authors")->where("id", "<", 10); |
| 65 | 65 | }) |
| 66 | 66 | ->get(); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | ->tags($tags) |
| 70 | 70 | ->get($key)['value']; |
| 71 | 71 | $liveResults = (new UncachedBook) |
| 72 | - ->whereNotIn("id", function ($query) { |
|
| 72 | + ->whereNotIn("id", function($query) { |
|
| 73 | 73 | $query->select("id")->from("authors")->where("id", "<", 10); |
| 74 | 74 | }) |
| 75 | 75 | ->get(); |
@@ -85,14 +85,14 @@ |
||
| 85 | 85 | $tags = ["genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesauthor"]; |
| 86 | 86 | |
| 87 | 87 | $authors = (new Author) |
| 88 | - ->whereIn('id', [1,2,3,4,5]) |
|
| 88 | + ->whereIn('id', [1, 2, 3, 4, 5]) |
|
| 89 | 89 | ->whereBetween('id', [1, 99999]) |
| 90 | 90 | ->get(); |
| 91 | 91 | $cachedResults = $this->cache() |
| 92 | 92 | ->tags($tags) |
| 93 | 93 | ->get($key)['value']; |
| 94 | 94 | $liveResults = (new UncachedAuthor) |
| 95 | - ->whereIn('id', [1,2,3,4,5]) |
|
| 95 | + ->whereIn('id', [1, 2, 3, 4, 5]) |
|
| 96 | 96 | ->whereBetween('id', [1, 99999]) |
| 97 | 97 | ->get(); |
| 98 | 98 | |
@@ -21,12 +21,12 @@ |
||
| 21 | 21 | public function testNestedWhereNullClauses() |
| 22 | 22 | { |
| 23 | 23 | $books = (new Book) |
| 24 | - ->where(function ($query) { |
|
| 24 | + ->where(function($query) { |
|
| 25 | 25 | $query->whereNull("description"); |
| 26 | 26 | }) |
| 27 | 27 | ->get(); |
| 28 | 28 | $uncachedBooks = (new UncachedBook) |
| 29 | - ->where(function ($query) { |
|
| 29 | + ->where(function($query) { |
|
| 30 | 30 | $query->whereNull("description"); |
| 31 | 31 | }) |
| 32 | 32 | ->get(); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | parent::setUp(); |
| 26 | 26 | |
| 27 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
| 27 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
| 28 | 28 | factory(Author::class, 10)->create(); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | public function testWhereClauseWorksWithDateTimeObject() |
| 37 | 37 | { |
| 38 | - $dateTime = (new DateTime('@' . time())) |
|
| 38 | + $dateTime = (new DateTime('@'.time())) |
|
| 39 | 39 | ->sub(new DateInterval("P10Y")); |
| 40 | 40 | $dateTimeString = $dateTime->format("Y-m-d-H-i-s"); |
| 41 | 41 | $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:books:genealabslaravelmodelcachingtestsfixturesbook-publish_at_>_{$dateTimeString}"); |
@@ -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 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $authors = (new Author) |
| 14 | 14 | ->where("id", 1) |
| 15 | 15 | ->with([ |
| 16 | - 'books' => function ($query) { |
|
| 16 | + 'books' => function($query) { |
|
| 17 | 17 | $query->where("id", "<", 100) |
| 18 | 18 | ->offset(5) |
| 19 | 19 | ->limit(1); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | ]) |
| 22 | 22 | ->first(); |
| 23 | 23 | $uncachedAuthor = (new UncachedAuthor)->with([ |
| 24 | - 'books' => function ($query) { |
|
| 24 | + 'books' => function($query) { |
|
| 25 | 25 | $query->where("id", "<", 100) |
| 26 | 26 | ->offset(5) |
| 27 | 27 | ->limit(1); |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | $author = (new Author) |
| 39 | 39 | ->where("id", 1) |
| 40 | 40 | ->with([ |
| 41 | - 'books' => function ($query) { |
|
| 41 | + 'books' => function($query) { |
|
| 42 | 42 | $query->where("id", "<", 100); |
| 43 | 43 | } |
| 44 | 44 | ]) |
| 45 | 45 | ->first(); |
| 46 | 46 | $uncachedAuthor = (new UncachedAuthor)->with([ |
| 47 | - 'books' => function ($query) { |
|
| 47 | + 'books' => function($query) { |
|
| 48 | 48 | $query->where("id", "<", 100); |
| 49 | 49 | }, |
| 50 | 50 | ]) |
@@ -60,13 +60,13 @@ discard block |
||
| 60 | 60 | $author = (new Author) |
| 61 | 61 | ->where("id", 1) |
| 62 | 62 | ->with([ |
| 63 | - 'books.publisher' => function ($query) { |
|
| 63 | + 'books.publisher' => function($query) { |
|
| 64 | 64 | $query->where("id", "<", 100); |
| 65 | 65 | } |
| 66 | 66 | ]) |
| 67 | 67 | ->first(); |
| 68 | 68 | $uncachedAuthor = (new UncachedAuthor)->with([ |
| 69 | - 'books.publisher' => function ($query) { |
|
| 69 | + 'books.publisher' => function($query) { |
|
| 70 | 70 | $query->where("id", "<", 100); |
| 71 | 71 | }, |
| 72 | 72 | ]) |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | ]; |
| 15 | 15 | |
| 16 | 16 | $books = (new Book) |
| 17 | - ->when(true, function ($query) { |
|
| 17 | + ->when(true, function($query) { |
|
| 18 | 18 | $query->where("id", "<", 5); |
| 19 | 19 | }) |
| 20 | 20 | ->get(); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | ->tags($tags) |
| 24 | 24 | ->get($key)['value']; |
| 25 | 25 | $liveResults = (new UncachedBook) |
| 26 | - ->when(true, function ($query) { |
|
| 26 | + ->when(true, function($query) { |
|
| 27 | 27 | $query->where("id", "<", 5); |
| 28 | 28 | }) |
| 29 | 29 | ->get(); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | (new Book) |
| 14 | 14 | ->get() |
| 15 | - ->each(function ($book) { |
|
| 15 | + ->each(function($book) { |
|
| 16 | 16 | $book->image()->create([ |
| 17 | 17 | "path" => app(Faker::class)->imageUrl(), |
| 18 | 18 | ]); |