@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | { |
69 | 69 | $supported = collect($resources) |
70 | 70 | ->merge($this->settings['global_pushes']) |
71 | - ->filter(function ($resource) { |
|
71 | + ->filter(function($resource) { |
|
72 | 72 | return array_key_exists($this->getExtension($resource), $this->extensionTypes); |
73 | 73 | }); |
74 | 74 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | private function transform(Collection $collection): Collection |
107 | 107 | { |
108 | - return $collection->map(function ($path) { |
|
108 | + return $collection->map(function($path) { |
|
109 | 109 | $hash = $this->retrieveHash($path); |
110 | 110 | |
111 | 111 | $extension = $this->getExtension($path); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | $cached = json_decode($cache, true); |
180 | 180 | |
181 | - return $pushable->filter(function ($item) use ($cached) { |
|
181 | + return $pushable->filter(function($item) use ($cached) { |
|
182 | 182 | return !in_array($item, $cached); |
183 | 183 | }); |
184 | 184 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | private function buildLink(Collection $pushable): string |
194 | 194 | { |
195 | - return $pushable->map(function ($item) { |
|
195 | + return $pushable->map(function($item) { |
|
196 | 196 | $push = "<{$item['path']}>; rel=preload; as={$item['type']}"; |
197 | 197 | |
198 | 198 | if ($item['type'] === 'font') { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $crawler = new Crawler($response->content()); |
61 | 61 | |
62 | 62 | $content = $crawler->filter('link, script[src], img[src]') |
63 | - ->extract(['src', 'href']); |
|
63 | + ->extract(['src', 'href']); |
|
64 | 64 | |
65 | 65 | // TODO: Ordering might be necessary for manifest files due to https://laravel.com/docs/5.5/mix#vendor-extraction |
66 | 66 | return collect($content)->flatten(1) |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | public function it_should_return_null_when_the_given_resources_already_got_cached() |
119 | 119 | { |
120 | 120 | $cache = $this->transform($this->pushable) |
121 | - ->toJson(); |
|
121 | + ->toJson(); |
|
122 | 122 | |
123 | 123 | $cookies = [ |
124 | 124 | $this->builderSettings['cookie']['name'] => $cache, |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $pushed = array_slice($this->pushable, 0, 4); |
140 | 140 | |
141 | 141 | $cache = $this->transform($pushed) |
142 | - ->toJson(); |
|
142 | + ->toJson(); |
|
143 | 143 | |
144 | 144 | $cookies = [ |
145 | 145 | $this->builderSettings['cookie']['name'] => $cache, |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | 'https://laravel.com/assets/img/laravel-logo-white.png', |
21 | 21 | ]); |
22 | 22 | |
23 | - $resources->each(function ($resource, $index) use ($resources, $method) { |
|
23 | + $resources->each(function($resource, $index) use ($resources, $method) { |
|
24 | 24 | $hash = $method->invokeArgs($this->builder, [$resource]); |
25 | 25 | |
26 | 26 | $this->assertNotNull($hash); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $transformed = $this->transform($this->pushable); |
41 | 41 | |
42 | - $transformed->each(function ($item) { |
|
42 | + $transformed->each(function($item) { |
|
43 | 43 | $this->assertArrayHasKey('type', $item); |
44 | 44 | $this->assertFalse($item['type'] === null); |
45 | 45 | $this->assertArrayHasKey('hash', $item); |