Passed
Pull Request — master (#103)
by Alexander
03:37
created
Classes/Controller/PageViewController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
                 $fulltext['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpFulltext]);
147 147
                 break;
148 148
             } else {
149
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
149
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
150 150
             }
151 151
         }
152 152
         if (empty($fulltext)) {
153
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpFulltext'] . '"');
153
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpFulltext'].'"');
154 154
         }
155 155
         return $fulltext;
156 156
     }
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
         $viewerConfiguration = '$(document).ready(function() {
169 169
                 if (dlfUtils.exists(dlfViewer)) {
170 170
                     tx_dlf_viewer = new dlfViewer({
171
-                        controls: ["' . implode('", "', $this->controls) . '"],
172
-                        div: "' . $this->settings['elementId'] . '",
173
-                        images: ' . json_encode($this->images) . ',
174
-                        fulltexts: ' . json_encode($this->fulltexts) . ',
175
-                        annotationContainers: ' . json_encode($this->annotationContainers) . ',
176
-                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . '
171
+                        controls: ["' . implode('", "', $this->controls).'"],
172
+                        div: "' . $this->settings['elementId'].'",
173
+                        images: ' . json_encode($this->images).',
174
+                        fulltexts: ' . json_encode($this->fulltexts).',
175
+                        annotationContainers: ' . json_encode($this->annotationContainers).',
176
+                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0).'
177 177
                     });
178 178
                 }
179 179
             });';
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
                 $image['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpImages]);
272 272
                 break;
273 273
             } else {
274
-                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
274
+                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
275 275
             }
276 276
         }
277 277
         if (empty($image)) {
278
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpImages'] . '"');
278
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpImages'].'"');
279 279
         }
280 280
         return $image;
281 281
     }
Please login to merge, or discard this patch.
Classes/Common/Indexer.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                         $parent->setDoc($doc);
116 116
                         $success = self::add($parent);
117 117
                     } else {
118
-                        Helper::log('Could not load parent document with UID ' . $document->getDoc()->parentId, LOG_SEVERITY_ERROR);
118
+                        Helper::log('Could not load parent document with UID '.$document->getDoc()->parentId, LOG_SEVERITY_ERROR);
119 119
                         return false;
120 120
                     }
121 121
                 }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 self::$processedDocs[] = $document->getUid();
126 126
                 // Delete old Solr documents.
127 127
                 $updateQuery = self::$solr->service->createUpdate();
128
-                $updateQuery->addDeleteQuery('uid:' . $document->getUid());
128
+                $updateQuery->addDeleteQuery('uid:'.$document->getUid());
129 129
                 self::$solr->service->update($updateQuery);
130 130
 
131 131
                 // Index every logical unit as separate Solr document.
@@ -174,14 +174,14 @@  discard block
 block discarded – undo
174 174
             } catch (\Exception $e) {
175 175
                 if (!(\TYPO3_REQUESTTYPE & \TYPO3_REQUESTTYPE_CLI)) {
176 176
                     Helper::addMessage(
177
-                        Helper::getLanguageService()->getLL('flash.solrException') . ' ' . htmlspecialchars($e->getMessage()),
177
+                        Helper::getLanguageService()->getLL('flash.solrException').' '.htmlspecialchars($e->getMessage()),
178 178
                         Helper::getLanguageService()->getLL('flash.error'),
179 179
                         FlashMessage::ERROR,
180 180
                         true,
181 181
                         'core.template.flashMessages'
182 182
                     );
183 183
                 }
184
-                Helper::log('Apache Solr threw exception: "' . $e->getMessage() . '"', LOG_SEVERITY_ERROR);
184
+                Helper::log('Apache Solr threw exception: "'.$e->getMessage().'"', LOG_SEVERITY_ERROR);
185 185
                 return false;
186 186
             }
187 187
         } else {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         // Sanitize input.
215 215
         $pid = max(intval($pid), 0);
216 216
         if (!$pid) {
217
-            Helper::log('Invalid PID ' . $pid . ' for metadata configuration', LOG_SEVERITY_ERROR);
217
+            Helper::log('Invalid PID '.$pid.' for metadata configuration', LOG_SEVERITY_ERROR);
218 218
             return '';
219 219
         }
220 220
         // Load metadata configuration.
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         $suffix = (in_array($index_name, self::$fields['tokenized']) ? 't' : 'u');
224 224
         $suffix .= (in_array($index_name, self::$fields['stored']) ? 's' : 'u');
225 225
         $suffix .= (in_array($index_name, self::$fields['indexed']) ? 'i' : 'u');
226
-        $index_name .= '_' . $suffix;
226
+        $index_name .= '_'.$suffix;
227 227
         return $index_name;
228 228
     }
229 229
 
@@ -356,11 +356,11 @@  discard block
 block discarded – undo
356 356
                     $solrDoc->setField(self::getIndexFieldName($index_name, $document->getPid()), $data, self::$fields['fieldboost'][$index_name]);
357 357
                     if (in_array($index_name, self::$fields['sortables'])) {
358 358
                         // Add sortable fields to index.
359
-                        $solrDoc->setField($index_name . '_sorting', $metadata[$index_name . '_sorting'][0]);
359
+                        $solrDoc->setField($index_name.'_sorting', $metadata[$index_name.'_sorting'][0]);
360 360
                     }
361 361
                     if (in_array($index_name, self::$fields['facets'])) {
362 362
                         // Add facets to index.
363
-                        $solrDoc->setField($index_name . '_faceting', $data);
363
+                        $solrDoc->setField($index_name.'_faceting', $data);
364 364
                     }
365 365
                     if (in_array($index_name, self::$fields['autocomplete'])) {
366 366
                         $autocomplete = array_merge($autocomplete, $data);
@@ -385,14 +385,14 @@  discard block
 block discarded – undo
385 385
             } catch (\Exception $e) {
386 386
                 if (!(\TYPO3_REQUESTTYPE & \TYPO3_REQUESTTYPE_CLI)) {
387 387
                     Helper::addMessage(
388
-                        Helper::getLanguageService()->getLL('flash.solrException') . '<br />' . htmlspecialchars($e->getMessage()),
388
+                        Helper::getLanguageService()->getLL('flash.solrException').'<br />'.htmlspecialchars($e->getMessage()),
389 389
                         Helper::getLanguageService()->getLL('flash.error'),
390 390
                         FlashMessage::ERROR,
391 391
                         true,
392 392
                         'core.template.flashMessages'
393 393
                     );
394 394
                 }
395
-                Helper::log('Apache Solr threw exception: "' . $e->getMessage() . '"', LOG_SEVERITY_ERROR);
395
+                Helper::log('Apache Solr threw exception: "'.$e->getMessage().'"', LOG_SEVERITY_ERROR);
396 396
                 return false;
397 397
             }
398 398
         }
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
                                 $data = self::removeAppendsFromAuthor($data);
459 459
                             }
460 460
                             // Add facets to index.
461
-                            $solrDoc->setField($index_name . '_faceting', $data);
461
+                            $solrDoc->setField($index_name.'_faceting', $data);
462 462
                         }
463 463
                     }
464 464
                 }
@@ -476,14 +476,14 @@  discard block
 block discarded – undo
476 476
             } catch (\Exception $e) {
477 477
                 if (!(\TYPO3_REQUESTTYPE & \TYPO3_REQUESTTYPE_CLI)) {
478 478
                     Helper::addMessage(
479
-                        Helper::getLanguageService()->getLL('flash.solrException') . '<br />' . htmlspecialchars($e->getMessage()),
479
+                        Helper::getLanguageService()->getLL('flash.solrException').'<br />'.htmlspecialchars($e->getMessage()),
480 480
                         Helper::getLanguageService()->getLL('flash.error'),
481 481
                         FlashMessage::ERROR,
482 482
                         true,
483 483
                         'core.template.flashMessages'
484 484
                     );
485 485
                 }
486
-                Helper::log('Apache Solr threw exception: "' . $e->getMessage() . '"', LOG_SEVERITY_ERROR);
486
+                Helper::log('Apache Solr threw exception: "'.$e->getMessage().'"', LOG_SEVERITY_ERROR);
487 487
                 return false;
488 488
             }
489 489
         }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
     private static function getSolrDocument($updateQuery, $document, $unit, $fullText = '') {
535 535
         $solrDoc = $updateQuery->createDocument();
536 536
         // Create unique identifier from document's UID and unit's XML ID.
537
-        $solrDoc->setField('id', $document->getUid() . $unit['id']);
537
+        $solrDoc->setField('id', $document->getUid().$unit['id']);
538 538
         $solrDoc->setField('uid', $document->getUid());
539 539
         $solrDoc->setField('pid', $document->getPid());
540 540
         $solrDoc->setField('partof', $document->getPartof());
Please login to merge, or discard this patch.
Classes/Controller/SearchController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         // Add uHash parameter to suggest parameter to make a basic protection of this form.
163 163
         if ($this->settings['suggest']) {
164
-            $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'));
164
+            $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest'));
165 165
         }
166 166
 
167 167
         $this->view->assign('viewData', $this->viewData);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         // Get facets from plugin configuration.
185 185
         $facets = [];
186 186
         foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) {
187
-            $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']);
187
+            $facets[$facet.'_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']);
188 188
         }
189 189
 
190 190
         $this->view->assign('facetsMenu', $this->makeFacetsMenuArray($facets));
@@ -226,13 +226,13 @@  discard block
 block discarded – undo
226 226
         $searchParams = $this->searchParams;
227 227
         if (
228 228
             (!empty($searchParams['fulltext']))
229
-            || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($searchParams['query']), $matches)
229
+            || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($searchParams['query']), $matches)
230 230
         ) {
231 231
             // If the query already is a fulltext query e.g using the facets
232 232
             $searchParams['query'] = empty($matches[1]) ? $searchParams['query'] : $matches[1];
233 233
             // Search in fulltext field if applicable. Query must not be empty!
234 234
             if (!empty($this->searchParams['query'])) {
235
-                $search['query'] = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($searchParams['query'])) . ')';
235
+                $search['query'] = $fields['fulltext'].':('.Solr::escapeQuery(trim($searchParams['query'])).')';
236 236
             }
237 237
         } else {
238 238
             // Retain given search field if valid.
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
                         in_array($searchParams['extOperator'][$i], $allowedOperators)
257 257
                     ) {
258 258
                         if (!empty($search['query'])) {
259
-                            $search['query'] .= ' ' . $searchParams['extOperator'][$i] . ' ';
259
+                            $search['query'] .= ' '.$searchParams['extOperator'][$i].' ';
260 260
                         }
261
-                        $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($searchParams['extQuery'][$i]) . ')';
261
+                        $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($searchParams['extQuery'][$i]).')';
262 262
                     }
263 263
                 }
264 264
             }
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         $entryArray['doNotLinkIt'] = 0;
384 384
         // Check if facet is already selected.
385 385
         $queryColumn = array_column($search['params']['filterquery'], 'query');
386
-        $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn);
386
+        $index = array_search($field.':("'.Solr::escapeQuery($value).'")', $queryColumn);
387 387
         if ($index !== false) {
388 388
             // Facet is selected, thus remove it from filter.
389 389
             unset($queryColumn[$index]);
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             }
398 398
         } else {
399 399
             // Facet is not selected, thus add it to filter.
400
-            $queryColumn[] = $field . ':("' . Solr::escapeQuery($value) . '")';
400
+            $queryColumn[] = $field.':("'.Solr::escapeQuery($value).'")';
401 401
             $entryArray['ITEM_STATE'] = 'NO';
402 402
         }
403 403
         $entryArray['queryColumn'] = $queryColumn;
Please login to merge, or discard this patch.
Tests/routeFunctionalInstance.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
 preg_match("@.*/(?:acceptance|functional-[a-z0-9]+)@", $_SERVER['REQUEST_URI'], $matches);
16 16
 
17 17
 if (!empty($matches)) {
18
-    $root = realpath($_SERVER['DOCUMENT_ROOT'] . $matches[0]);
18
+    $root = realpath($_SERVER['DOCUMENT_ROOT'].$matches[0]);
19 19
     if ($root !== false) {
20
-        putenv('TYPO3_PATH_ROOT=' . $root);
21
-        putenv('TYPO3_PATH_APP=' . $root);
20
+        putenv('TYPO3_PATH_ROOT='.$root);
21
+        putenv('TYPO3_PATH_APP='.$root);
22 22
     }
23 23
 }
24 24
 
Please login to merge, or discard this patch.
Tests/Functional/FunctionalTestCase.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration();
71 71
 
72 72
         if ($this->disableJsonWrappedResponse) {
73
-            $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function ($ext) {
73
+            $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function($ext) {
74 74
                 return $ext !== 'Resources/Core/Functional/Extensions/json_response';
75 75
             });
76 76
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
84 84
 
85
-        $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/';
85
+        $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-'.$this->identifier.'/';
86 86
         $this->httpClient = new HttpClient([
87 87
             'base_uri' => $this->baseUrl,
88 88
             'http_errors' => false,
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
 
127 127
     protected function addSiteConfig($identifier, $baseUrl)
128 128
     {
129
-        $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml');
129
+        $siteConfig = Yaml::parseFile(__DIR__.'/../Fixtures/siteconfig.yaml');
130 130
         $siteConfig['base'] = $baseUrl;
131 131
         $siteConfig['languages'][0]['base'] = $baseUrl;
132 132
 
133
-        $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier;
133
+        $siteConfigPath = $this->instancePath.'/typo3conf/sites/'.$identifier;
134 134
         @mkdir($siteConfigPath, 0775, true);
135
-        file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
135
+        file_put_contents($siteConfigPath.'/config.yaml', Yaml::dump($siteConfig));
136 136
     }
137 137
 
138 138
     protected function initializeRepository(string $className, int $storagePid)
Please login to merge, or discard this patch.
Tests/Functional/Api/PageViewProxyTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         ]);
78 78
 
79 79
         $this->assertEquals(200, $response->getStatusCode());
80
-        $this->assertEquals('This is some plain text test file.' . "\n", (string) $response->getBody());
80
+        $this->assertEquals('This is some plain text test file.'."\n", (string) $response->getBody());
81 81
     }
82 82
 
83 83
     /**
Please login to merge, or discard this patch.
Tests/Functional/Api/OaiPmhTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
     {
38 38
         parent::setUp();
39 39
 
40
-        $this->oaiUrl = $this->baseUrl . '/index.php?id=' . $this->oaiPage;
41
-        $this->oaiUrlNoStoragePid = $this->baseUrl . '/index.php?id=' . $this->oaiPageNoStoragePid;
40
+        $this->oaiUrl = $this->baseUrl.'/index.php?id='.$this->oaiPage;
41
+        $this->oaiUrlNoStoragePid = $this->baseUrl.'/index.php?id='.$this->oaiPageNoStoragePid;
42 42
 
43
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.xml');
44
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/metadata.xml');
45
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/libraries.xml');
46
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/pages.xml');
47
-        $this->importDataSet(__DIR__ . '/../../Fixtures/OaiPmh/pages.xml');
48
-        $this->importDataSet(__DIR__ . '/../../Fixtures/OaiPmh/solrcores.xml');
43
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_1.xml');
44
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/metadata.xml');
45
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/libraries.xml');
46
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/pages.xml');
47
+        $this->importDataSet(__DIR__.'/../../Fixtures/OaiPmh/pages.xml');
48
+        $this->importDataSet(__DIR__.'/../../Fixtures/OaiPmh/solrcores.xml');
49 49
 
50 50
         $this->persistenceManager = $this->objectManager->get(PersistenceManager::class);
51 51
         $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             $coreName = Solr::createCore();
63 63
             $solr = Solr::getInstance($coreName);
64 64
 
65
-            $this->importSolrDocuments($solr, __DIR__ . '/../../Fixtures/Common/documents_1.solr.json');
65
+            $this->importSolrDocuments($solr, __DIR__.'/../../Fixtures/Common/documents_1.solr.json');
66 66
         }
67 67
 
68 68
         $oaiCoreModel = $this->solrCoreRepository->findByUid(11001);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $jsonDocuments = json_decode(file_get_contents($path), true);
77 77
 
78 78
         $updateQuery = $solr->service->createUpdate();
79
-        $documents = array_map(function ($jsonDoc) use ($updateQuery) {
79
+        $documents = array_map(function($jsonDoc) use ($updateQuery) {
80 80
             $document = $updateQuery->createDocument();
81 81
             foreach ($jsonDoc as $key => $value) {
82 82
                 $document->setField($key, $value);
Please login to merge, or discard this patch.
Tests/Functional/Repository/DocumentRepositoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@
 block discarded – undo
21 21
 
22 22
         $this->documentRepository = $this->initializeRepository(DocumentRepository::class, 20000);
23 23
 
24
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.xml');
25
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/pages.xml');
26
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/libraries.xml');
24
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_1.xml');
25
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/pages.xml');
26
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/libraries.xml');
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
Tests/Functional/Common/SolrIndexingTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
         $this->documentRepository = $this->initializeRepository(DocumentRepository::class, 20000);
38 38
         $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000);
39 39
 
40
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.xml');
41
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/libraries.xml');
42
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/metadata.xml');
40
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_1.xml');
41
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/libraries.xml');
42
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/metadata.xml');
43 43
     }
44 44
 
45 45
     /**
Please login to merge, or discard this patch.