@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | parent::boot(); |
| 30 | 30 | |
| 31 | - static::addGlobalScope('inlineScope', function (CachedBuilder $builder) { |
|
| 31 | + static::addGlobalScope('inlineScope', function(CachedBuilder $builder) { |
|
| 32 | 32 | return $builder->where('name', 'LIKE', "A%"); |
| 33 | 33 | }); |
| 34 | 34 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | parent::boot(); |
| 28 | 28 | |
| 29 | - static::addGlobalScope('inlineScope', function (Builder $builder) { |
|
| 29 | + static::addGlobalScope('inlineScope', function(Builder $builder) { |
|
| 30 | 30 | return $builder->where('name', 'LIKE', "A%"); |
| 31 | 31 | }); |
| 32 | 32 | } |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use GeneaLabs\LaravelModelCaching\Tests\Fixtures\Book; |
| 4 | 4 | |
| 5 | -Route::get('pagination-test', function () { |
|
| 5 | +Route::get('pagination-test', function() { |
|
| 6 | 6 | $books = (new Book) |
| 7 | 7 | ->paginate(10); |
| 8 | 8 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | )); |
| 13 | 13 | }); |
| 14 | 14 | |
| 15 | -Route::get('pagination-test2', function () { |
|
| 15 | +Route::get('pagination-test2', function() { |
|
| 16 | 16 | $books = (new Book) |
| 17 | 17 | ->paginate(10, ["*"], "custom-page"); |
| 18 | 18 | |
@@ -30,14 +30,14 @@ |
||
| 30 | 30 | { |
| 31 | 31 | $books = (new Book) |
| 32 | 32 | ->with("stores") |
| 33 | - ->whereHas("stores", function ($query) { |
|
| 33 | + ->whereHas("stores", function($query) { |
|
| 34 | 34 | $query->whereRaw('address like ?', ['%s%']); |
| 35 | 35 | }) |
| 36 | 36 | ->get(); |
| 37 | 37 | |
| 38 | 38 | $uncachedBooks = (new UncachedBook) |
| 39 | 39 | ->with("stores") |
| 40 | - ->whereHas("stores", function ($query) { |
|
| 40 | + ->whereHas("stores", function($query) { |
|
| 41 | 41 | $query->whereRaw('address like ?', ['%s%']); |
| 42 | 42 | }) |
| 43 | 43 | ->get(); |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | $authors = (new Author) |
| 25 | 25 | ->where("id", ">", 0) |
| 26 | - ->whereHas("books", function ($query) { |
|
| 26 | + ->whereHas("books", function($query) { |
|
| 27 | 27 | $query->whereNull("description"); |
| 28 | 28 | }) |
| 29 | 29 | ->get(); |
| 30 | 30 | $uncachedAuthors = (new UncachedAuthor) |
| 31 | 31 | ->where("id", ">", 0) |
| 32 | - ->whereHas("books", function ($query) { |
|
| 32 | + ->whereHas("books", function($query) { |
|
| 33 | 33 | $query->whereNull("description"); |
| 34 | 34 | }) |
| 35 | 35 | ->get(); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesuncachedstore" |
| 53 | 53 | ]) |
| 54 | 54 | ->get(sha1( |
| 55 | - "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:books:genealabslaravelmodelcachingtestsfixturesbook-exists-" . |
|
| 55 | + "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:books:genealabslaravelmodelcachingtestsfixturesbook-exists-". |
|
| 56 | 56 | "and_books.id_=_book_store.book_id-testing:{$this->testingSqlitePath}testing.sqlite:uncachedStores" |
| 57 | 57 | )); |
| 58 | 58 | |
@@ -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 | |