@@ -11,9 +11,9 @@ |
||
11 | 11 | | |
12 | 12 | */ |
13 | 13 | |
14 | -Route::group(['middleware' => 'cors'], function () { |
|
14 | +Route::group(['middleware' => 'cors'], function() { |
|
15 | 15 | |
16 | - Route::get('api/', function () { |
|
16 | + Route::get('api/', function() { |
|
17 | 17 | return view('welcome'); |
18 | 18 | }); |
19 | 19 |
@@ -137,12 +137,12 @@ |
||
137 | 137 | 'sleep-time-on-error' => $this->sleepTimeOnError, |
138 | 138 | ]); |
139 | 139 | |
140 | - $client->on('request.error', function ($msg) { |
|
140 | + $client->on('request.error', function($msg) { |
|
141 | 141 | $this->error($msg); |
142 | 142 | }); |
143 | 143 | |
144 | 144 | // Store each response to disk just in case |
145 | - $client->on('request.complete', function ($verb, $args, $body) use ($latest) { |
|
145 | + $client->on('request.complete', function($verb, $args, $body) use ($latest) { |
|
146 | 146 | Storage::disk('local')->put($latest, $body); |
147 | 147 | }); |
148 | 148 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function register() |
22 | 22 | { |
23 | - \App::bind('covercache', function () { |
|
23 | + \App::bind('covercache', function() { |
|
24 | 24 | return new CoverCache(); |
25 | 25 | }); |
26 | 26 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function map(Router $router) |
37 | 37 | { |
38 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
38 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
39 | 39 | require app_path('Http/routes.php'); |
40 | 40 | }); |
41 | 41 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | public function scrape(Crawler $crawler) |
58 | 58 | { |
59 | - $texts = $crawler->filter('#accordion > *')->each(function (Crawler $node) { |
|
59 | + $texts = $crawler->filter('#accordion > *')->each(function(Crawler $node) { |
|
60 | 60 | return $node->text(); |
61 | 61 | }); |
62 | 62 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | public function scrape(Crawler $crawler) |
15 | 15 | { |
16 | - $texts = $crawler->filter('.productPageBody > p')->each(function (Crawler $node) { |
|
16 | + $texts = $crawler->filter('.productPageBody > p')->each(function(Crawler $node) { |
|
17 | 17 | return $node->text(); |
18 | 18 | }); |
19 | 19 | $text = implode('\n\n', $texts); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | public function scrape(Crawler $crawler) |
15 | 15 | { |
16 | - $texts = $crawler->filter('.book-details > div')->each(function (Crawler $node) { |
|
16 | + $texts = $crawler->filter('.book-details > div')->each(function(Crawler $node) { |
|
17 | 17 | if (strpos($node->attr('class'), 'row') === false) { |
18 | 18 | return $node->text(); |
19 | 19 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | */ |
30 | 30 | public function toArray() |
31 | 31 | { |
32 | - $body = $this->doc->bibliographic; // PHP makes a copy for us |
|
32 | + $body = $this->doc->bibliographic; // PHP makes a copy for us |
|
33 | 33 | |
34 | 34 | $body['id'] = $this->doc->id; |
35 | 35 | $body['bibsys_id'] = $this->doc->bibsys_id; |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | 'AA' => 'audio', |
11 | 11 | 'AA BA' => 'audio book', |
12 | 12 | 'BA' => 'book', |
13 | - 'BA DA' => 'ebook', // Yes, we DO actually get these |
|
13 | + 'BA DA' => 'ebook', // Yes, we DO actually get these |
|
14 | 14 | 'BB' => 'hardcover', |
15 | - 'BB BC' => 'book', // ... and these |
|
16 | - 'BB DA' => 'ebook', // ... and these |
|
15 | + 'BB BC' => 'book', // ... and these |
|
16 | + 'BB DA' => 'ebook', // ... and these |
|
17 | 17 | 'BC' => 'paperback', |
18 | - 'BC DA' => 'ebook', // ... and these |
|
18 | + 'BC DA' => 'ebook', // ... and these |
|
19 | 19 | 'DA' => 'digital', |
20 | 20 | 'FA' => 'film/transp.', |
21 | 21 | 'MA' => 'microform', |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | if (isset($this->formats[$formStr])) { |
50 | 50 | return $this->formats[$formStr]; |
51 | 51 | } |
52 | - $formStr = implode(' ', array_map(function ($el) { |
|
52 | + $formStr = implode(' ', array_map(function($el) { |
|
53 | 53 | return $this->formats[$el]; |
54 | 54 | }, $forms)); |
55 | 55 | \Log::warning(sprintf('Unknown form: %s', $formStr)); |