We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | // Set default values if not set. |
| 53 | 53 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
| 54 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 54 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 55 | 55 | |
| 56 | 56 | $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
| 57 | 57 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | .$this->pi_getLL('fulltext-on', '', TRUE).';fulltext-off:' |
| 85 | 85 | .$this->pi_getLL('fulltext-off', '', TRUE).'"> </a>'; |
| 86 | 86 | } else { |
| 87 | - $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">' . $this->pi_getLL('fulltext-not-available', '', TRUE) . '</span>'; |
|
| 87 | + $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">'.$this->pi_getLL('fulltext-not-available', '', TRUE).'</span>'; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | |
| 39 | 39 | // require Apache_Solr_HttpTransport_Response |
| 40 | -require_once(dirname(__FILE__) . '/Response.php'); |
|
| 40 | +require_once(dirname(__FILE__).'/Response.php'); |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * Interface that all Transport (HTTP Requester) implementations must implement. These |
@@ -79,14 +79,14 @@ discard block |
||
| 79 | 79 | * |
| 80 | 80 | * @var array |
| 81 | 81 | */ |
| 82 | - protected $_fields = array(); |
|
| 82 | + protected $_fields = array (); |
|
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * Document field boost values, indexed by name |
| 86 | 86 | * |
| 87 | 87 | * @var array array of floats |
| 88 | 88 | */ |
| 89 | - protected $_fieldBoosts = array(); |
|
| 89 | + protected $_fieldBoosts = array (); |
|
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * Clear all boosts and fields from this document |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | $this->_documentBoost = false; |
| 97 | 97 | |
| 98 | - $this->_fields = array(); |
|
| 99 | - $this->_fieldBoosts = array(); |
|
| 98 | + $this->_fields = array (); |
|
| 99 | + $this->_fieldBoosts = array (); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -156,12 +156,12 @@ discard block |
||
| 156 | 156 | if (!isset($this->_fields[$key])) |
| 157 | 157 | { |
| 158 | 158 | // create holding array if this is the first value |
| 159 | - $this->_fields[$key] = array(); |
|
| 159 | + $this->_fields[$key] = array (); |
|
| 160 | 160 | } |
| 161 | 161 | else if (!is_array($this->_fields[$key])) |
| 162 | 162 | { |
| 163 | 163 | // move existing value into array if it is not already an array |
| 164 | - $this->_fields[$key] = array($this->_fields[$key]); |
|
| 164 | + $this->_fields[$key] = array ($this->_fields[$key]); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | if ($this->getFieldBoost($key) === false) |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | { |
| 204 | 204 | if (isset($this->_fields[$key])) |
| 205 | 205 | { |
| 206 | - return array( |
|
| 206 | + return array ( |
|
| 207 | 207 | 'name' => $key, |
| 208 | 208 | 'value' => $this->_fields[$key], |
| 209 | 209 | 'boost' => $this->getFieldBoost($key) |
@@ -38,9 +38,9 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | // See Issue #1 (http://code.google.com/p/solr-php-client/issues/detail?id=1) |
| 40 | 40 | // Doesn't follow typical include path conventions, but is more convenient for users |
| 41 | -require_once(dirname(dirname(__FILE__)) . '/Service.php'); |
|
| 41 | +require_once(dirname(dirname(__FILE__)).'/Service.php'); |
|
| 42 | 42 | |
| 43 | -require_once(dirname(dirname(__FILE__)) . '/NoServiceAvailableException.php'); |
|
| 43 | +require_once(dirname(dirname(__FILE__)).'/NoServiceAvailableException.php'); |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Reference Implementation for using multiple Solr services in a distribution. Functionality |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | protected $_createDocuments = true; |
| 64 | 64 | |
| 65 | - protected $_readableServices = array(); |
|
| 66 | - protected $_writeableServices = array(); |
|
| 65 | + protected $_readableServices = array (); |
|
| 66 | + protected $_writeableServices = array (); |
|
| 67 | 67 | |
| 68 | 68 | protected $_currentReadService = null; |
| 69 | 69 | protected $_currentWriteService = null; |
@@ -72,10 +72,10 @@ discard block |
||
| 72 | 72 | protected $_writePingTimeout = 4; |
| 73 | 73 | |
| 74 | 74 | // Configuration for server selection backoff intervals |
| 75 | - protected $_useBackoff = false; // Set to true to use more resillient write server selection |
|
| 76 | - protected $_backoffLimit = 600; // 10 minute default maximum |
|
| 77 | - protected $_backoffEscalation = 2.0; // Rate at which to increase backoff period |
|
| 78 | - protected $_defaultBackoff = 2.0; // Default backoff interval |
|
| 75 | + protected $_useBackoff = false; // Set to true to use more resillient write server selection |
|
| 76 | + protected $_backoffLimit = 600; // 10 minute default maximum |
|
| 77 | + protected $_backoffEscalation = 2.0; // Rate at which to increase backoff period |
|
| 78 | + protected $_defaultBackoff = 2.0; // Default backoff interval |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * Escape a value for special query characters such as ':', '(', ')', '*', '?', etc. |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * @param array $readableServices |
| 119 | 119 | * @param array $writeableServices |
| 120 | 120 | */ |
| 121 | - public function __construct($readableServices = array(), $writeableServices = array()) |
|
| 121 | + public function __construct($readableServices = array (), $writeableServices = array ()) |
|
| 122 | 122 | { |
| 123 | 123 | //setup readable services |
| 124 | 124 | foreach ($readableServices as $service) |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | protected function _getServiceId($host, $port, $path) |
| 160 | 160 | { |
| 161 | - return $host . ':' . $port . $path; |
|
| 161 | + return $host.':'.$port.$path; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | { |
| 182 | 182 | if (isset($service['host']) && isset($service['port']) && isset($service['path'])) |
| 183 | 183 | { |
| 184 | - $id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']); |
|
| 184 | + $id = $this->_getServiceId((string) $service['host'], (int) $service['port'], (string) $service['path']); |
|
| 185 | 185 | |
| 186 | 186 | $this->_readableServices[$id] = $service; |
| 187 | 187 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | { |
| 212 | 212 | if (isset($service['host']) && isset($service['port']) && isset($service['path'])) |
| 213 | 213 | { |
| 214 | - $id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']); |
|
| 214 | + $id = $this->_getServiceId((string) $service['host'], (int) $service['port'], (string) $service['path']); |
|
| 215 | 215 | } |
| 216 | 216 | else |
| 217 | 217 | { |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | { |
| 250 | 250 | if (isset($service['host']) && isset($service['port']) && isset($service['path'])) |
| 251 | 251 | { |
| 252 | - $id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']); |
|
| 252 | + $id = $this->_getServiceId((string) $service['host'], (int) $service['port'], (string) $service['path']); |
|
| 253 | 253 | |
| 254 | 254 | $this->_writeableServices[$id] = $service; |
| 255 | 255 | } |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | { |
| 280 | 280 | if (isset($service['host']) && isset($service['port']) && isset($service['path'])) |
| 281 | 281 | { |
| 282 | - $id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']); |
|
| 282 | + $id = $this->_getServiceId((string) $service['host'], (int) $service['port'], (string) $service['path']); |
|
| 283 | 283 | } |
| 284 | 284 | else |
| 285 | 285 | { |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | */ |
| 356 | 356 | protected function _selectWriteService($forceSelect = false) |
| 357 | 357 | { |
| 358 | - if($this->_useBackoff) |
|
| 358 | + if ($this->_useBackoff) |
|
| 359 | 359 | { |
| 360 | 360 | return $this->_selectWriteServiceSafe($forceSelect); |
| 361 | 361 | } |
@@ -435,12 +435,12 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | $backoff *= $this->_backoffEscalation; |
| 437 | 437 | |
| 438 | - if($backoff > $this->_backoffLimit) |
|
| 438 | + if ($backoff > $this->_backoffLimit) |
|
| 439 | 439 | { |
| 440 | 440 | throw new Apache_Solr_NoServiceAvailableException('No write services were available. All timeouts exceeded.'); |
| 441 | 441 | } |
| 442 | 442 | |
| 443 | - } while($this->_writeableServices[$this->_currentWriteService]->ping($backoff) === false); |
|
| 443 | + } while ($this->_writeableServices[$this->_currentWriteService]->ping($backoff) === false); |
|
| 444 | 444 | } |
| 445 | 445 | else |
| 446 | 446 | { |
@@ -773,7 +773,7 @@ discard block |
||
| 773 | 773 | * |
| 774 | 774 | * @throws Apache_Solr_InvalidArgumentException if $file, $params, or $document are invalid. |
| 775 | 775 | */ |
| 776 | - public function extract($file, $params = array(), $document = null, $mimetype = 'application/octet-stream') |
|
| 776 | + public function extract($file, $params = array (), $document = null, $mimetype = 'application/octet-stream') |
|
| 777 | 777 | { |
| 778 | 778 | $service = $this->_selectWriteService(); |
| 779 | 779 | |
@@ -817,7 +817,7 @@ discard block |
||
| 817 | 817 | * |
| 818 | 818 | * @todo Should be using multipart/form-data to post parameter values, but I could not get my implementation to work. Needs revisisted. |
| 819 | 819 | */ |
| 820 | - public function extractFromString($data, $params = array(), $document = null, $mimetype = 'application/octet-stream') |
|
| 820 | + public function extractFromString($data, $params = array (), $document = null, $mimetype = 'application/octet-stream') |
|
| 821 | 821 | { |
| 822 | 822 | $service = $this->_selectWriteService(); |
| 823 | 823 | |
@@ -888,7 +888,7 @@ discard block |
||
| 888 | 888 | * |
| 889 | 889 | * @throws Apache_Solr_HttpTransportException If an error occurs during the service call |
| 890 | 890 | */ |
| 891 | - public function search($query, $offset = 0, $limit = 10, $params = array(), $method = Apache_Solr_Service::METHOD_GET) |
|
| 891 | + public function search($query, $offset = 0, $limit = 10, $params = array (), $method = Apache_Solr_Service::METHOD_GET) |
|
| 892 | 892 | { |
| 893 | 893 | $service = $this->_selectReadService(); |
| 894 | 894 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * @author Donovan Jimenez <[email protected]> |
| 37 | 37 | */ |
| 38 | 38 | |
| 39 | -require_once(dirname(__FILE__) . '/ParserException.php'); |
|
| 39 | +require_once(dirname(__FILE__).'/ParserException.php'); |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * Represents a Solr response. Parses the raw response into a set of stdClass objects |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | //and we have response documents, then try to collapse the values and / or convert them now |
| 211 | 211 | if (($this->_createDocuments || $this->_collapseSingleValueArrays) && isset($data->response) && is_array($data->response->docs)) |
| 212 | 212 | { |
| 213 | - $documents = array(); |
|
| 213 | + $documents = array (); |
|
| 214 | 214 | |
| 215 | 215 | foreach ($data->response->docs as $originalDocument) |
| 216 | 216 | { |
@@ -38,14 +38,14 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | // See Issue #1 (http://code.google.com/p/solr-php-client/issues/detail?id=1) |
| 40 | 40 | // Doesn't follow typical include path conventions, but is more convenient for users |
| 41 | -require_once(dirname(__FILE__) . '/Exception.php'); |
|
| 42 | -require_once(dirname(__FILE__) . '/HttpTransportException.php'); |
|
| 43 | -require_once(dirname(__FILE__) . '/InvalidArgumentException.php'); |
|
| 41 | +require_once(dirname(__FILE__).'/Exception.php'); |
|
| 42 | +require_once(dirname(__FILE__).'/HttpTransportException.php'); |
|
| 43 | +require_once(dirname(__FILE__).'/InvalidArgumentException.php'); |
|
| 44 | 44 | |
| 45 | -require_once(dirname(__FILE__) . '/Document.php'); |
|
| 46 | -require_once(dirname(__FILE__) . '/Response.php'); |
|
| 45 | +require_once(dirname(__FILE__).'/Document.php'); |
|
| 46 | +require_once(dirname(__FILE__).'/Response.php'); |
|
| 47 | 47 | |
| 48 | -require_once(dirname(__FILE__) . '/HttpTransport/Interface.php'); |
|
| 48 | +require_once(dirname(__FILE__).'/HttpTransport/Interface.php'); |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Starting point for the Solr API. Represents a Solr server resource and has |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | */ |
| 221 | 221 | static public function phrase($value) |
| 222 | 222 | { |
| 223 | - return '"' . self::escapePhrase($value) . '"'; |
|
| 223 | + return '"'.self::escapePhrase($value).'"'; |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | /** |
@@ -255,26 +255,26 @@ discard block |
||
| 255 | 255 | * @param string $servlet |
| 256 | 256 | * @return string |
| 257 | 257 | */ |
| 258 | - protected function _constructUrl($servlet, $params = array()) |
|
| 258 | + protected function _constructUrl($servlet, $params = array ()) |
|
| 259 | 259 | { |
| 260 | 260 | if (count($params)) |
| 261 | 261 | { |
| 262 | 262 | //escape all parameters appropriately for inclusion in the query string |
| 263 | - $escapedParams = array(); |
|
| 263 | + $escapedParams = array (); |
|
| 264 | 264 | |
| 265 | 265 | foreach ($params as $key => $value) |
| 266 | 266 | { |
| 267 | - $escapedParams[] = urlencode($key) . '=' . urlencode($value); |
|
| 267 | + $escapedParams[] = urlencode($key).'='.urlencode($value); |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | - $queryString = $this->_queryDelimiter . implode($this->_queryStringDelimiter, $escapedParams); |
|
| 270 | + $queryString = $this->_queryDelimiter.implode($this->_queryStringDelimiter, $escapedParams); |
|
| 271 | 271 | } |
| 272 | 272 | else |
| 273 | 273 | { |
| 274 | 274 | $queryString = ''; |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | - return 'http://' . $this->_host . ':' . $this->_port . $this->_path . $servlet . $queryString; |
|
| 277 | + return 'http://'.$this->_host.':'.$this->_port.$this->_path.$servlet.$queryString; |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | /** |
@@ -286,8 +286,8 @@ discard block |
||
| 286 | 286 | $this->_extractUrl = $this->_constructUrl(self::EXTRACT_SERVLET); |
| 287 | 287 | $this->_pingUrl = $this->_constructUrl(self::PING_SERVLET); |
| 288 | 288 | $this->_searchUrl = $this->_constructUrl(self::SEARCH_SERVLET); |
| 289 | - $this->_threadsUrl = $this->_constructUrl(self::THREADS_SERVLET, array('wt' => self::SOLR_WRITER )); |
|
| 290 | - $this->_updateUrl = $this->_constructUrl(self::UPDATE_SERVLET, array('wt' => self::SOLR_WRITER )); |
|
| 289 | + $this->_threadsUrl = $this->_constructUrl(self::THREADS_SERVLET, array ('wt' => self::SOLR_WRITER)); |
|
| 290 | + $this->_updateUrl = $this->_constructUrl(self::UPDATE_SERVLET, array ('wt' => self::SOLR_WRITER)); |
|
| 291 | 291 | |
| 292 | 292 | $this->_urlsInited = true; |
| 293 | 293 | } |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | { |
| 459 | 459 | $path = trim($path, '/'); |
| 460 | 460 | |
| 461 | - $this->_path = '/' . $path . '/'; |
|
| 461 | + $this->_path = '/'.$path.'/'; |
|
| 462 | 462 | |
| 463 | 463 | if ($this->_urlsInited) |
| 464 | 464 | { |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | // lazy load a default if one has not be set |
| 477 | 477 | if ($this->_httpTransport === false) |
| 478 | 478 | { |
| 479 | - require_once(dirname(__FILE__) . '/HttpTransport/FileGetContents.php'); |
|
| 479 | + require_once(dirname(__FILE__).'/HttpTransport/FileGetContents.php'); |
|
| 480 | 480 | |
| 481 | 481 | $this->_httpTransport = new Apache_Solr_HttpTransport_FileGetContents(); |
| 482 | 482 | } |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | |
| 745 | 745 | if ($document->getBoost() !== false) |
| 746 | 746 | { |
| 747 | - $xml .= ' boost="' . $document->getBoost() . '"'; |
|
| 747 | + $xml .= ' boost="'.$document->getBoost().'"'; |
|
| 748 | 748 | } |
| 749 | 749 | |
| 750 | 750 | $xml .= '>'; |
@@ -758,11 +758,11 @@ discard block |
||
| 758 | 758 | { |
| 759 | 759 | foreach ($value as $multivalue) |
| 760 | 760 | { |
| 761 | - $xml .= '<field name="' . $key . '"'; |
|
| 761 | + $xml .= '<field name="'.$key.'"'; |
|
| 762 | 762 | |
| 763 | 763 | if ($fieldBoost !== false) |
| 764 | 764 | { |
| 765 | - $xml .= ' boost="' . $fieldBoost . '"'; |
|
| 765 | + $xml .= ' boost="'.$fieldBoost.'"'; |
|
| 766 | 766 | |
| 767 | 767 | // only set the boost for the first field in the set |
| 768 | 768 | $fieldBoost = false; |
@@ -770,21 +770,21 @@ discard block |
||
| 770 | 770 | |
| 771 | 771 | $multivalue = htmlspecialchars($multivalue, ENT_NOQUOTES, 'UTF-8'); |
| 772 | 772 | |
| 773 | - $xml .= '>' . $multivalue . '</field>'; |
|
| 773 | + $xml .= '>'.$multivalue.'</field>'; |
|
| 774 | 774 | } |
| 775 | 775 | } |
| 776 | 776 | else |
| 777 | 777 | { |
| 778 | - $xml .= '<field name="' . $key . '"'; |
|
| 778 | + $xml .= '<field name="'.$key.'"'; |
|
| 779 | 779 | |
| 780 | 780 | if ($fieldBoost !== false) |
| 781 | 781 | { |
| 782 | - $xml .= ' boost="' . $fieldBoost . '"'; |
|
| 782 | + $xml .= ' boost="'.$fieldBoost.'"'; |
|
| 783 | 783 | } |
| 784 | 784 | |
| 785 | 785 | $value = htmlspecialchars($value, ENT_NOQUOTES, 'UTF-8'); |
| 786 | 786 | |
| 787 | - $xml .= '>' . $value . '</field>'; |
|
| 787 | + $xml .= '>'.$value.'</field>'; |
|
| 788 | 788 | } |
| 789 | 789 | } |
| 790 | 790 | |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | $flushValue = $waitFlush ? 'true' : 'false'; |
| 825 | 825 | $searcherValue = $waitSearcher ? 'true' : 'false'; |
| 826 | 826 | |
| 827 | - $rawPost = '<commit expungeDeletes="' . $expungeValue . '" waitFlush="' . $flushValue . '" waitSearcher="' . $searcherValue . '" />'; |
|
| 827 | + $rawPost = '<commit expungeDeletes="'.$expungeValue.'" waitFlush="'.$flushValue.'" waitSearcher="'.$searcherValue.'" />'; |
|
| 828 | 828 | |
| 829 | 829 | return $this->_sendRawPost($this->_updateUrl, $rawPost, $timeout); |
| 830 | 830 | } |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | //escape special xml characters |
| 864 | 864 | $id = htmlspecialchars($id, ENT_NOQUOTES, 'UTF-8'); |
| 865 | 865 | |
| 866 | - $rawPost = '<delete fromPending="' . $pendingValue . '" fromCommitted="' . $committedValue . '"><id>' . $id . '</id></delete>'; |
|
| 866 | + $rawPost = '<delete fromPending="'.$pendingValue.'" fromCommitted="'.$committedValue.'"><id>'.$id.'</id></delete>'; |
|
| 867 | 867 | |
| 868 | 868 | return $this->delete($rawPost, $timeout); |
| 869 | 869 | } |
@@ -884,14 +884,14 @@ discard block |
||
| 884 | 884 | $pendingValue = $fromPending ? 'true' : 'false'; |
| 885 | 885 | $committedValue = $fromCommitted ? 'true' : 'false'; |
| 886 | 886 | |
| 887 | - $rawPost = '<delete fromPending="' . $pendingValue . '" fromCommitted="' . $committedValue . '">'; |
|
| 887 | + $rawPost = '<delete fromPending="'.$pendingValue.'" fromCommitted="'.$committedValue.'">'; |
|
| 888 | 888 | |
| 889 | 889 | foreach ($ids as $id) |
| 890 | 890 | { |
| 891 | 891 | //escape special xml characters |
| 892 | 892 | $id = htmlspecialchars($id, ENT_NOQUOTES, 'UTF-8'); |
| 893 | 893 | |
| 894 | - $rawPost .= '<id>' . $id . '</id>'; |
|
| 894 | + $rawPost .= '<id>'.$id.'</id>'; |
|
| 895 | 895 | } |
| 896 | 896 | |
| 897 | 897 | $rawPost .= '</delete>'; |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | // escape special xml characters |
| 919 | 919 | $rawQuery = htmlspecialchars($rawQuery, ENT_NOQUOTES, 'UTF-8'); |
| 920 | 920 | |
| 921 | - $rawPost = '<delete fromPending="' . $pendingValue . '" fromCommitted="' . $committedValue . '"><query>' . $rawQuery . '</query></delete>'; |
|
| 921 | + $rawPost = '<delete fromPending="'.$pendingValue.'" fromCommitted="'.$committedValue.'"><query>'.$rawQuery.'</query></delete>'; |
|
| 922 | 922 | |
| 923 | 923 | return $this->delete($rawPost, $timeout); |
| 924 | 924 | } |
@@ -941,7 +941,7 @@ discard block |
||
| 941 | 941 | * |
| 942 | 942 | * @throws Apache_Solr_InvalidArgumentException if $file, $params, or $document are invalid. |
| 943 | 943 | */ |
| 944 | - public function extract($file, $params = array(), $document = null, $mimetype = 'application/octet-stream') |
|
| 944 | + public function extract($file, $params = array (), $document = null, $mimetype = 'application/octet-stream') |
|
| 945 | 945 | { |
| 946 | 946 | // check if $params is an array (allow null for default empty array) |
| 947 | 947 | if (!is_null($params)) |
@@ -953,7 +953,7 @@ discard block |
||
| 953 | 953 | } |
| 954 | 954 | else |
| 955 | 955 | { |
| 956 | - $params = array(); |
|
| 956 | + $params = array (); |
|
| 957 | 957 | } |
| 958 | 958 | |
| 959 | 959 | // if $file is an http request, defer to extractFromUrl instead |
@@ -1002,7 +1002,7 @@ discard block |
||
| 1002 | 1002 | * |
| 1003 | 1003 | * @todo Should be using multipart/form-data to post parameter values, but I could not get my implementation to work. Needs revisisted. |
| 1004 | 1004 | */ |
| 1005 | - public function extractFromString($data, $params = array(), $document = null, $mimetype = 'application/octet-stream') |
|
| 1005 | + public function extractFromString($data, $params = array (), $document = null, $mimetype = 'application/octet-stream') |
|
| 1006 | 1006 | { |
| 1007 | 1007 | // check if $params is an array (allow null for default empty array) |
| 1008 | 1008 | if (!is_null($params)) |
@@ -1014,7 +1014,7 @@ discard block |
||
| 1014 | 1014 | } |
| 1015 | 1015 | else |
| 1016 | 1016 | { |
| 1017 | - $params = array(); |
|
| 1017 | + $params = array (); |
|
| 1018 | 1018 | } |
| 1019 | 1019 | |
| 1020 | 1020 | // make sure we receive our response in JSON and have proper name list treatment |
@@ -1044,7 +1044,7 @@ discard block |
||
| 1044 | 1044 | $queryString = $this->_generateQueryString($params); |
| 1045 | 1045 | |
| 1046 | 1046 | // the file contents will be sent to SOLR as the POST BODY - we use application/octect-stream as default mimetype |
| 1047 | - return $this->_sendRawPost($this->_extractUrl . $this->_queryDelimiter . $queryString, $data, false, $mimetype); |
|
| 1047 | + return $this->_sendRawPost($this->_extractUrl.$this->_queryDelimiter.$queryString, $data, false, $mimetype); |
|
| 1048 | 1048 | } |
| 1049 | 1049 | |
| 1050 | 1050 | /** |
@@ -1065,7 +1065,7 @@ discard block |
||
| 1065 | 1065 | * |
| 1066 | 1066 | * @throws Apache_Solr_InvalidArgumentException if $url, $params, or $document are invalid. |
| 1067 | 1067 | */ |
| 1068 | - public function extractFromUrl($url, $params = array(), $document = null, $mimetype = 'application/octet-stream') |
|
| 1068 | + public function extractFromUrl($url, $params = array (), $document = null, $mimetype = 'application/octet-stream') |
|
| 1069 | 1069 | { |
| 1070 | 1070 | // check if $params is an array (allow null for default empty array) |
| 1071 | 1071 | if (!is_null($params)) |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | } |
| 1078 | 1078 | else |
| 1079 | 1079 | { |
| 1080 | - $params = array(); |
|
| 1080 | + $params = array (); |
|
| 1081 | 1081 | } |
| 1082 | 1082 | |
| 1083 | 1083 | $httpTransport = $this->getHttpTransport(); |
@@ -1119,7 +1119,7 @@ discard block |
||
| 1119 | 1119 | $flushValue = $waitFlush ? 'true' : 'false'; |
| 1120 | 1120 | $searcherValue = $waitSearcher ? 'true' : 'false'; |
| 1121 | 1121 | |
| 1122 | - $rawPost = '<optimize waitFlush="' . $flushValue . '" waitSearcher="' . $searcherValue . '" />'; |
|
| 1122 | + $rawPost = '<optimize waitFlush="'.$flushValue.'" waitSearcher="'.$searcherValue.'" />'; |
|
| 1123 | 1123 | |
| 1124 | 1124 | return $this->_sendRawPost($this->_updateUrl, $rawPost, $timeout); |
| 1125 | 1125 | } |
@@ -1137,7 +1137,7 @@ discard block |
||
| 1137 | 1137 | * @throws Apache_Solr_HttpTransportException If an error occurs during the service call |
| 1138 | 1138 | * @throws Apache_Solr_InvalidArgumentException If an invalid HTTP method is used |
| 1139 | 1139 | */ |
| 1140 | - public function search($query, $offset = 0, $limit = 10, $params = array(), $method = self::METHOD_GET) |
|
| 1140 | + public function search($query, $offset = 0, $limit = 10, $params = array (), $method = self::METHOD_GET) |
|
| 1141 | 1141 | { |
| 1142 | 1142 | // ensure params is an array |
| 1143 | 1143 | if (!is_null($params)) |
@@ -1150,7 +1150,7 @@ discard block |
||
| 1150 | 1150 | } |
| 1151 | 1151 | else |
| 1152 | 1152 | { |
| 1153 | - $params = array(); |
|
| 1153 | + $params = array (); |
|
| 1154 | 1154 | } |
| 1155 | 1155 | |
| 1156 | 1156 | // construct our full parameters |
@@ -1167,7 +1167,7 @@ discard block |
||
| 1167 | 1167 | |
| 1168 | 1168 | if ($method == self::METHOD_GET) |
| 1169 | 1169 | { |
| 1170 | - return $this->_sendRawGet($this->_searchUrl . $this->_queryDelimiter . $queryString); |
|
| 1170 | + return $this->_sendRawGet($this->_searchUrl.$this->_queryDelimiter.$queryString); |
|
| 1171 | 1171 | } |
| 1172 | 1172 | else if ($method == self::METHOD_POST) |
| 1173 | 1173 | { |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | * |
| 50 | 50 | * @var array |
| 51 | 51 | */ |
| 52 | - static private $_defaultStatusMessages = array( |
|
| 52 | + static private $_defaultStatusMessages = array ( |
|
| 53 | 53 | // Specific to PHP Solr Client |
| 54 | 54 | 0 => "Communication Error", |
| 55 | 55 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | |
| 39 | 39 | // Require Apache_Solr_HttpTransport_Abstract |
| 40 | -require_once(dirname(__FILE__) . '/Abstract.php'); |
|
| 40 | +require_once(dirname(__FILE__).'/Abstract.php'); |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * A Curl based HTTP transport. Uses a single curl session for all requests. |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $this->_curl = curl_init(); |
| 71 | 71 | |
| 72 | 72 | // set common options that will not be changed during the session |
| 73 | - curl_setopt_array($this->_curl, array( |
|
| 73 | + curl_setopt_array($this->_curl, array ( |
|
| 74 | 74 | // return the response body from curl_exec |
| 75 | 75 | CURLOPT_RETURNTRANSFER => true, |
| 76 | 76 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | // set curl GET options |
| 104 | - curl_setopt_array($this->_curl, array( |
|
| 104 | + curl_setopt_array($this->_curl, array ( |
|
| 105 | 105 | // make sure we're returning the body |
| 106 | 106 | CURLOPT_NOBODY => false, |
| 107 | 107 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | // set curl HEAD options |
| 138 | - curl_setopt_array($this->_curl, array( |
|
| 138 | + curl_setopt_array($this->_curl, array ( |
|
| 139 | 139 | // this both sets the method to HEAD and says not to return a body |
| 140 | 140 | CURLOPT_NOBODY => true, |
| 141 | 141 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | // set curl POST options |
| 169 | - curl_setopt_array($this->_curl, array( |
|
| 169 | + curl_setopt_array($this->_curl, array ( |
|
| 170 | 170 | // make sure we're returning the body |
| 171 | 171 | CURLOPT_NOBODY => false, |
| 172 | 172 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | CURLOPT_POSTFIELDS => $postData, |
| 181 | 181 | |
| 182 | 182 | // set the content type |
| 183 | - CURLOPT_HTTPHEADER => array("Content-Type: {$contentType}"), |
|
| 183 | + CURLOPT_HTTPHEADER => array ("Content-Type: {$contentType}"), |
|
| 184 | 184 | |
| 185 | 185 | // set the timeout |
| 186 | 186 | CURLOPT_TIMEOUT => $timeout |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | |
| 39 | 39 | // Require Apache_Solr_HttpTransport_Abstract |
| 40 | -require_once(dirname(__FILE__) . '/Abstract.php'); |
|
| 40 | +require_once(dirname(__FILE__).'/Abstract.php'); |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * An alternative Curl HTTP transport that opens and closes a curl session for |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $curl = curl_init(); |
| 69 | 69 | |
| 70 | 70 | // set curl GET options |
| 71 | - curl_setopt_array($curl, array( |
|
| 71 | + curl_setopt_array($curl, array ( |
|
| 72 | 72 | // return the response body from curl_exec |
| 73 | 73 | CURLOPT_RETURNTRANSFER => true, |
| 74 | 74 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $curl = curl_init(); |
| 111 | 111 | |
| 112 | 112 | // set curl HEAD options |
| 113 | - curl_setopt_array($curl, array( |
|
| 113 | + curl_setopt_array($curl, array ( |
|
| 114 | 114 | // return the response body from curl_exec |
| 115 | 115 | CURLOPT_RETURNTRANSFER => true, |
| 116 | 116 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $curl = curl_init(); |
| 156 | 156 | |
| 157 | 157 | // set curl POST options |
| 158 | - curl_setopt_array($curl, array( |
|
| 158 | + curl_setopt_array($curl, array ( |
|
| 159 | 159 | // return the response body from curl_exec |
| 160 | 160 | CURLOPT_RETURNTRANSFER => true, |
| 161 | 161 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | CURLOPT_POSTFIELDS => $postData, |
| 176 | 176 | |
| 177 | 177 | // set the content type |
| 178 | - CURLOPT_HTTPHEADER => array("Content-Type: {$contentType}"), |
|
| 178 | + CURLOPT_HTTPHEADER => array ("Content-Type: {$contentType}"), |
|
| 179 | 179 | |
| 180 | 180 | // set the timeout |
| 181 | 181 | CURLOPT_TIMEOUT => $timeout |