We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -107,6 +107,6 @@ |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | private function getUid($uid) { |
| 110 | - return is_numeric($uid) > 0 ? intval($uid) : $uid; |
|
| 110 | + return is_numeric($uid) > 0 ? intval($uid) : $uid; |
|
| 111 | 111 | } |
| 112 | 112 | } |
@@ -102,11 +102,13 @@ |
||
| 102 | 102 | return $response; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - private function getQuery($fields, $parameters) { |
|
| 105 | + private function getQuery($fields, $parameters) |
|
| 106 | + { |
|
| 106 | 107 | return $fields['fulltext'] . ':(' . Solr::escapeQuery((string) $parameters['q']) . ') AND ' . $fields['uid'] . ':' . $this->getUid($parameters['uid']); |
| 107 | 108 | } |
| 108 | 109 | |
| 109 | - private function getUid($uid) { |
|
| 110 | + private function getUid($uid) |
|
| 111 | + { |
|
| 110 | 112 | return is_numeric($uid) > 0 ? intval($uid) : $uid; |
| 111 | 113 | } |
| 112 | 114 | } |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | // We don't expect to get more than 10.000 hits per UID. |
| 265 | 265 | $query->setStart(0)->setRows(1000); |
| 266 | 266 | // Take over existing filter queries. |
| 267 | - if(isset($this->metadata['options']['params']['filterquery'])) { |
|
| 267 | + if (isset($this->metadata['options']['params']['filterquery'])) { |
|
| 268 | 268 | $query->addFilterQuery($this->metadata['options']['params']['filterquery']); |
| 269 | 269 | } |
| 270 | 270 | // Extend filter query to get all documents with the same UID. |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | $record['metadata'] = $metadata; |
| 328 | 328 | } else { |
| 329 | 329 | $highlight = ''; |
| 330 | - if(!empty($highlighting)) { |
|
| 330 | + if (!empty($highlighting)) { |
|
| 331 | 331 | $resultDocument = new ResultDocument($resArray, $highlighting, Solr::getFields()); |
| 332 | 332 | $highlight = $resultDocument->getSnippets(); |
| 333 | 333 | } |
@@ -250,7 +250,8 @@ discard block |
||
| 250 | 250 | return $record; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | - private function getSolrResult($record) { |
|
| 253 | + private function getSolrResult($record) |
|
| 254 | + { |
|
| 254 | 255 | $fields = Solr::getFields(); |
| 255 | 256 | |
| 256 | 257 | $query = $solr->service->createSelect(); |
@@ -305,7 +306,8 @@ discard block |
||
| 305 | 306 | return $this->solr->service->createResult($query, $response); |
| 306 | 307 | } |
| 307 | 308 | |
| 308 | - private function getSolrRecord($record, $result) { |
|
| 309 | + private function getSolrRecord($record, $result) |
|
| 310 | + { |
|
| 309 | 311 | // If it is a fulltext search, fetch the highlighting results. |
| 310 | 312 | if ($this->metadata['fulltextSearch']) { |
| 311 | 313 | $data = $result->getData(); |