Completed
Pull Request — master (#408)
by
unknown
42s
created
tests/Integration/CachedBuilder/DateTimeTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
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}:http://localhost");
Please login to merge, or discard this patch.
tests/Integration/CachedBuilder/WhereRawTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             ->whereRaw("name != 'test3'")
35 35
             ->whereRaw('name = ? AND name != ?', [$authorName, "test2"])
36 36
             ->get();
37
-        $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-name_!=_test-_and_name_!=_'test3'-_and_name_=_" . str_replace(" ", "_", $authorName) . "__AND_name_!=_test2-authors.deleted_at_null:http://localhost");
37
+        $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-name_!=_test-_and_name_!=_'test3'-_and_name_=_".str_replace(" ", "_", $authorName)."__AND_name_!=_test2-authors.deleted_at_null:http://localhost");
38 38
         $tags = ["genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesauthor"];
39 39
 
40 40
         $cachedResults = collect([$this->cache()->tags($tags)->get($key)['value']]);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         ];
71 71
 
72 72
         $authors = (new Author)
73
-            ->where(function ($query) {
73
+            ->where(function($query) {
74 74
                 $query->orWhereRaw("id BETWEEN 1 AND 3")
75 75
                     ->orWhereRaw("id BETWEEN 5 AND 6");
76 76
             })
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
     public function testNestedWhereRawWithBindings()
83 83
     {
84 84
         $books = (new Book)
85
-            ->where(function ($query) {
86
-                $query->whereRaw("title like ? or description like ? or published_at like ? or price like ?", ['%larravel%', '%larravel%', '%larravel%', '%larravel%',]);
85
+            ->where(function($query) {
86
+                $query->whereRaw("title like ? or description like ? or published_at like ? or price like ?", ['%larravel%', '%larravel%', '%larravel%', '%larravel%', ]);
87 87
             })->get();
88 88
 
89 89
         $uncachedBooks = (new UncachedBook)
90
-            ->where(function ($query) {
91
-                $query->whereRaw("title like ? or description like ? or published_at like ? or price like ?", ['%larravel%', '%larravel%', '%larravel%', '%larravel%',]);
90
+            ->where(function($query) {
91
+                $query->whereRaw("title like ? or description like ? or published_at like ? or price like ?", ['%larravel%', '%larravel%', '%larravel%', '%larravel%', ]);
92 92
             })->get();
93 93
 
94 94
         $this->assertEquals($books->pluck("id"), $uncachedBooks->pluck("id"));
Please login to merge, or discard this patch.
tests/Integration/HelperTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
         $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-authors.deleted_at_null:http://localhost");
12 12
         $tags = ["genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesauthor"];
13 13
 
14
-        $authors = app("model-cache")->runDisabled(function () {
14
+        $authors = app("model-cache")->runDisabled(function() {
15 15
             return (new Author)
16 16
                 ->get();
17 17
         });
Please login to merge, or discard this patch.