@@ -165,13 +165,13 @@ discard block |
||
| 165 | 165 | ->execute(); |
| 166 | 166 | |
| 167 | 167 | while ($resArray = $result->fetch()) { |
| 168 | - $fields[] = $resArray['index_name'] . '_' . ($resArray['index_tokenized'] ? 't' : 'u') . ($resArray['index_stored'] ? 's' : 'u') . 'i'; |
|
| 168 | + $fields[] = $resArray['index_name'].'_'.($resArray['index_tokenized'] ? 't' : 'u').($resArray['index_stored'] ? 's' : 'u').'i'; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | // Check if queried field is valid. |
| 172 | 172 | $splitQuery = explode(':', $query, 2); |
| 173 | 173 | if (in_array($splitQuery[0], $fields)) { |
| 174 | - $query = $splitQuery[0] . ':(' . self::escapeQuery(trim($splitQuery[1], '()')) . ')'; |
|
| 174 | + $query = $splitQuery[0].':('.self::escapeQuery(trim($splitQuery[1], '()')).')'; |
|
| 175 | 175 | } else { |
| 176 | 176 | $query = self::escapeQuery($query); |
| 177 | 177 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | // Check if core is set. |
| 204 | 204 | if (empty($core)) { |
| 205 | - Helper::devLog('Invalid core name "' . $core . '" for Apache Solr', DEVLOG_SEVERITY_ERROR); |
|
| 205 | + Helper::devLog('Invalid core name "'.$core.'" for Apache Solr', DEVLOG_SEVERITY_ERROR); |
|
| 206 | 206 | return; |
| 207 | 207 | } |
| 208 | 208 | // Check if there is an instance in the registry already. |
@@ -271,12 +271,12 @@ discard block |
||
| 271 | 271 | $solrInfo['username'] |
| 272 | 272 | && $solrInfo['password'] |
| 273 | 273 | ) { |
| 274 | - $host = $solrInfo['username'] . ':' . $solrInfo['password'] . '@' . $solrInfo['host']; |
|
| 274 | + $host = $solrInfo['username'].':'.$solrInfo['password'].'@'.$solrInfo['host']; |
|
| 275 | 275 | } else { |
| 276 | 276 | $host = $solrInfo['host']; |
| 277 | 277 | } |
| 278 | 278 | // Return entire request URL. |
| 279 | - return $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/solr/' . $core; |
|
| 279 | + return $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/solr/'.$core; |
|
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | /** |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | { |
| 293 | 293 | $start = max(intval($start), 0); |
| 294 | 294 | // Check if core already exists. |
| 295 | - if (self::getInstance('dlfCore' . $start) === null) { |
|
| 295 | + if (self::getInstance('dlfCore'.$start) === null) { |
|
| 296 | 296 | return $start; |
| 297 | 297 | } else { |
| 298 | 298 | return self::solrGetCoreNumber($start + 1); |
@@ -327,13 +327,13 @@ discard block |
||
| 327 | 327 | // Extend filter query to get all documents with the same uids. |
| 328 | 328 | foreach ($params['filterquery'] as $key => $value) { |
| 329 | 329 | if (isset($value['query'])) { |
| 330 | - $params['filterquery'][$key]['query'] = '{!join from=uid to=uid}' . $value['query']; |
|
| 330 | + $params['filterquery'][$key]['query'] = '{!join from=uid to=uid}'.$value['query']; |
|
| 331 | 331 | } |
| 332 | 332 | } |
| 333 | 333 | // Set filter query to just get toplevel documents. |
| 334 | 334 | $params['filterquery'][] = ['query' => 'toplevel:true']; |
| 335 | 335 | // Set join query to get all documents with the same uids. |
| 336 | - $params['query'] = '{!join from=uid to=uid}' . $params['query']; |
|
| 336 | + $params['query'] = '{!join from=uid to=uid}'.$params['query']; |
|
| 337 | 337 | // Perform search to determine the total number of toplevel hits and fetch the required rows. |
| 338 | 338 | $selectQuery = $this->service->createSelect($params); |
| 339 | 339 | $results = $this->service->select($selectQuery); |
@@ -511,12 +511,12 @@ discard block |
||
| 511 | 511 | */ |
| 512 | 512 | public function __get($var) |
| 513 | 513 | { |
| 514 | - $method = '_get' . ucfirst($var); |
|
| 514 | + $method = '_get'.ucfirst($var); |
|
| 515 | 515 | if ( |
| 516 | 516 | !property_exists($this, $var) |
| 517 | 517 | || !method_exists($this, $method) |
| 518 | 518 | ) { |
| 519 | - Helper::devLog('There is no getter function for property "' . $var . '"', DEVLOG_SEVERITY_WARNING); |
|
| 519 | + Helper::devLog('There is no getter function for property "'.$var.'"', DEVLOG_SEVERITY_WARNING); |
|
| 520 | 520 | return; |
| 521 | 521 | } else { |
| 522 | 522 | return $this->$method(); |
@@ -549,12 +549,12 @@ discard block |
||
| 549 | 549 | */ |
| 550 | 550 | public function __set($var, $value) |
| 551 | 551 | { |
| 552 | - $method = '_set' . ucfirst($var); |
|
| 552 | + $method = '_set'.ucfirst($var); |
|
| 553 | 553 | if ( |
| 554 | 554 | !property_exists($this, $var) |
| 555 | 555 | || !method_exists($this, $method) |
| 556 | 556 | ) { |
| 557 | - Helper::devLog('There is no setter function for property "' . $var . '"', DEVLOG_SEVERITY_WARNING); |
|
| 557 | + Helper::devLog('There is no setter function for property "'.$var.'"', DEVLOG_SEVERITY_WARNING); |
|
| 558 | 558 | } else { |
| 559 | 559 | $this->$method($value); |
| 560 | 560 | } |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | 'scheme' => $solrInfo['scheme'], |
| 579 | 579 | 'host' => $solrInfo['host'], |
| 580 | 580 | 'port' => $solrInfo['port'], |
| 581 | - 'path' => '/' . $solrInfo['path'] . '/', |
|
| 581 | + 'path' => '/'.$solrInfo['path'].'/', |
|
| 582 | 582 | 'core' => $core, |
| 583 | 583 | 'username' => $solrInfo['username'], |
| 584 | 584 | 'password' => $solrInfo['password'], |