Completed
Push — master ( fcdc06...2647f7 )
by Dan Michael O.
07:17
created
app/Console/Commands/HarvestXisbn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
49 49
      */
50 50
     public function handleDocuments(XisbnClient $client, $docs)
51 51
     {
52
-        $this->info('Will check ' . count($docs) . ' documents');
53
-        Log::info('[HarvestXisbnJob] Starting job. ' . count($docs) . ' documents to be checked.');
52
+        $this->info('Will check '.count($docs).' documents');
53
+        Log::info('[HarvestXisbnJob] Starting job. '.count($docs).' documents to be checked.');
54 54
 
55 55
         $this->output->progressStart(count($docs));
56 56
         foreach ($docs as $doc) {
Please login to merge, or discard this patch.
app/Http/Requests/SearchDocumentsRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
                 $this->warnings[] = 'Offset cannot be negative.';
26 26
             } elseif ($input['offset'] > $maxPaginationDepth) {
27 27
                 $input['offset'] = $maxPaginationDepth;
28
-                $this->warnings[] = 'Pagination depth is limited to ' . $maxPaginationDepth . ' results.';
28
+                $this->warnings[] = 'Pagination depth is limited to '.$maxPaginationDepth.' results.';
29 29
             }
30 30
         }
31 31
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
                 $this->warnings[] = 'Limit cannot be negative.';
37 37
             } elseif ($input['limit'] > $maxResultsPerRequest) {
38 38
                 $input['limit'] = $maxResultsPerRequest;
39
-                $this->warnings[] = 'Limiting to max ' . $maxResultsPerRequest . ' results per request.';
39
+                $this->warnings[] = 'Limiting to max '.$maxResultsPerRequest.' results per request.';
40 40
             }
41 41
         }
42 42
 
Please login to merge, or discard this patch.
app/GoogleBooksService.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Colligator;
4 4
 
5 5
 use Scriptotek\GoogleBooks\GoogleBooks;
6
-use Scriptotek\GoogleBooks\Exceptions\UsageRateExceeded;
7 6
 
8 7
 class GoogleBooksService implements EnrichmentService
9 8
 {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         foreach ($isbns as $isbn) {
21 21
             $volume = $this->books->volumes->byIsbn($isbn);
22
-            \Log::debug('[GoogleBooksService] - ' . $isbn . ': ' . (is_null($volume) ? 'not found' : 'found'));
22
+            \Log::debug('[GoogleBooksService] - '.$isbn.': '.(is_null($volume) ? 'not found' : 'found'));
23 23
             if (!is_null($volume)) {
24 24
                 return $volume;
25 25
             }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function enrich(Document $doc)
31 31
     {
32
-        \Log::debug('[GoogleBooksService] Checking document ' . $doc->id);
32
+        \Log::debug('[GoogleBooksService] Checking document '.$doc->id);
33 33
 
34 34
         $volume = $this->get($doc->bibliographic['isbns']);
35 35
 
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
         if ($volume) {
48 48
             $cover_url = $volume->getCover();
49 49
             if (!is_null($cover_url) && is_null($doc->cover)) {
50
-                \Log::debug('[GoogleBooksService] Setting new cover to document #' . $doc->id);
50
+                \Log::debug('[GoogleBooksService] Setting new cover to document #'.$doc->id);
51 51
                 try {
52 52
                     $doc->storeCover($cover_url);
53 53
                 } catch (\ErrorException $e) {
54
-                    \Log::error('[GoogleBooksService] Failed to store cover: ' . $cover_url . "\n" . $e->getMessage());
54
+                    \Log::error('[GoogleBooksService] Failed to store cover: '.$cover_url."\n".$e->getMessage());
55 55
                 }
56 56
             }
57 57
         }
Please login to merge, or discard this patch.
app/Console/Commands/EnrichDocuments.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function handleDocuments(EnrichmentService $service, $docs)
73 73
     {
74
-        \Log::info('[EnrichDocuments] Starting job. ' . count($docs) . ' documents to be checked using the "' . $service::$serviceName . '" service.');
74
+        \Log::info('[EnrichDocuments] Starting job. '.count($docs).' documents to be checked using the "'.$service::$serviceName.'" service.');
75 75
 
76 76
         // $this->output->progressStart(count($docs));
77 77
         foreach ($docs as $doc) {
@@ -107,22 +107,22 @@  discard block
 block discarded – undo
107 107
         $collectionId = intval($this->option('collection'));
108 108
 
109 109
         if (!isset($this->services[$serviceName])) {
110
-            $this->error('Service "' . $serviceName . '" is not defined. Available servies: "' . implode('", "', array_keys($this->services)) . '".');
110
+            $this->error('Service "'.$serviceName.'" is not defined. Available servies: "'.implode('", "', array_keys($this->services)).'".');
111 111
             return;
112 112
         }
113 113
 
114 114
         if ($verbose) {
115
-            \DB::listen(function ($query, $bindings) {
116
-                $this->comment('Query: ' . $query . '. Bindings: ' . implode(', ', $bindings));
115
+            \DB::listen(function($query, $bindings) {
116
+                $this->comment('Query: '.$query.'. Bindings: '.implode(', ', $bindings));
117 117
             });
118 118
         }
119 119
 
120
-        $collectionHelp = ($collectionId > 0) ? ' in collection ' . $collectionId : '';
120
+        $collectionHelp = ($collectionId > 0) ? ' in collection '.$collectionId : '';
121 121
 
122 122
         $docs = $this->getDocumentsToBeChecked($serviceName, $force, $collectionId);
123 123
 
124 124
         if (!count($docs)) {
125
-            $this->info('No new documents' . $collectionHelp . '. Exiting.');
125
+            $this->info('No new documents'.$collectionHelp.'. Exiting.');
126 126
             \Log::info('[EnrichDocuments] No new documents to be checked.');
127 127
             return;
128 128
         }
Please login to merge, or discard this patch.
app/Providers/BroadcastServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         /*
20 20
          * Authenticate the user's personal channel...
21 21
          */
22
-        Broadcast::channel('Colligator.User.{userId}', function ($user, $userId) {
22
+        Broadcast::channel('Colligator.User.{userId}', function($user, $userId) {
23 23
             return (int) $user->id === (int) $userId;
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         Route::group([
42 42
             'middleware' => 'web',
43 43
             'namespace' => $this->namespace,
44
-        ], function () {
44
+        ], function() {
45 45
             require base_path('routes/web.php');
46 46
         });
47 47
     }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             'middleware' => 'api',
59 59
             'namespace' => $this->namespace,
60 60
             // 'prefix' => 'api',
61
-        ], function () {
61
+        ], function() {
62 62
             require base_path('routes/api.php');
63 63
         });
64 64
     }
Please login to merge, or discard this patch.
app/Marc21Importer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
             $rec = MarcRecord::fromString($q);
58 58
 
59 59
             $itemMap = [
60
-                'x' => 'location',  // OBS: 1030310
61
-                'y' => 'shelvinglocation',  // OBS: k00475
60
+                'x' => 'location', // OBS: 1030310
61
+                'y' => 'shelvinglocation', // OBS: k00475
62 62
                 'b' => 'barcode',
63 63
                 'z' => 'callcode',
64 64
                 'a' => 'id',
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             try {
191 191
                 $doc->storeCover($biblio['cover_image']);
192 192
             } catch (\ErrorException $e) {
193
-                \Log::error('Failed to store cover: ' . $biblio['cover_image']);
193
+                \Log::error('Failed to store cover: '.$biblio['cover_image']);
194 194
             }
195 195
         }
196 196
 
@@ -207,14 +207,14 @@  discard block
 block discarded – undo
207 207
         try {
208 208
             list($biblio, $holdings) = $this->parseRecord($record);
209 209
         } catch (ParserException $e) {
210
-            $this->error('Failed to parse MARC record. Error "' . $e->getMessage() . '" in: ' . $e->getFile() . ':' . $e->getLine() . "\nStack trace:\n" . $e->getTraceAsString());
210
+            $this->error('Failed to parse MARC record. Error "'.$e->getMessage().'" in: '.$e->getFile().':'.$e->getLine()."\nStack trace:\n".$e->getTraceAsString());
211 211
 
212 212
             return null;
213 213
         }
214 214
 
215 215
         $doc = $this->importParsedRecord($biblio, $holdings);
216 216
 
217
-        \Log::debug('[Marc21Importer] Imported ' . $doc->bibsys_id . ' as ' . $doc->id);
217
+        \Log::debug('[Marc21Importer] Imported '.$doc->bibsys_id.' as '.$doc->id);
218 218
 
219 219
         if (!is_null($doc)) {
220 220
             Event::fire(new Marc21RecordImported($doc->id));
Please login to merge, or discard this patch.
app/Cover.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function invalidateCache()
79 79
     {
80 80
         if (!is_null($this->width) && !is_null($this->height)) {
81
-            \Log::debug('[Cover] Invalidating cache. Old version was ' . $this->width . ' x ' . $this->height);
81
+            \Log::debug('[Cover] Invalidating cache. Old version was '.$this->width.' x '.$this->height);
82 82
         }
83 83
         $this->width = null;
84 84
         $this->height = null;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             $orig = \CoverCache::putBlob($blob);
134 134
 
135 135
         } else {
136
-            \Log::debug('[Cover] Add to cache from url: ' . $this->url);
136
+            \Log::debug('[Cover] Add to cache from url: '.$this->url);
137 137
             $orig = \CoverCache::putUrl($this->url);
138 138
         }
139 139
 
Please login to merge, or discard this patch.
app/Jobs/OaiPmhHarvest.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,6 @@
 block discarded – undo
7 7
 use Log;
8 8
 use Phpoaipmh\Client;
9 9
 use Phpoaipmh\Endpoint;
10
-use Scriptotek\OaiPmh\ListRecordsResponse;
11
-use Storage;
12 10
 
13 11
 class OaiPmhHarvest extends Job
14 12
 {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function handle()
109 109
     {
110
-        Log::info('[OaiPmhHarvest] Starting job. Requesting records from ' . ($this->start ?: '(no limit)') . ' until ' . ($this->until ?: '(no limit)') . '.');
110
+        Log::info('[OaiPmhHarvest] Starting job. Requesting records from '.($this->start ?: '(no limit)').' until '.($this->until ?: '(no limit)').'.');
111 111
 
112 112
         // For timing
113 113
         $this->startTime = $this->batchTime = microtime(true) - 1;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         $recordsHarvested = $this->fromNetwork();
123 123
 
124
-        Log::info('[OaiPmhHarvest] Harvest complete, got ' . $recordsHarvested . ' records.');
124
+        Log::info('[OaiPmhHarvest] Harvest complete, got '.$recordsHarvested.' records.');
125 125
     }
126 126
 
127 127
     /**
Please login to merge, or discard this patch.