Commit a2a33ee8 authored by Dorian Villet's avatar Dorian Villet

Add space between if and opening parenthesis.

parent 4fdffc4a
...@@ -158,7 +158,7 @@ class Curl extends Configurable implements AdapterInterface ...@@ -158,7 +158,7 @@ class Curl extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility // Try endpoint authentication first, fallback to request for backwards compatibility
$authData = $endpoint->getAuthentication(); $authData = $endpoint->getAuthentication();
if(empty($authData['username'])) $authData = $request->getAuthentication(); if (empty($authData['username'])) $authData = $request->getAuthentication();
if ( !empty($authData['username']) && !empty($authData['password'])) { if ( !empty($authData['username']) && !empty($authData['password'])) {
curl_setopt($handler, CURLOPT_USERPWD, $authData['username']. ':' . $authData['password'] ); curl_setopt($handler, CURLOPT_USERPWD, $authData['username']. ':' . $authData['password'] );
......
...@@ -129,7 +129,7 @@ class Http extends Configurable implements AdapterInterface ...@@ -129,7 +129,7 @@ class Http extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility // Try endpoint authentication first, fallback to request for backwards compatibility
$authData = $endpoint->getAuthentication(); $authData = $endpoint->getAuthentication();
if(empty($authData['username'])) $authData = $request->getAuthentication(); if (empty($authData['username'])) $authData = $request->getAuthentication();
if ( !empty($authData['username']) && !empty($authData['password'])) { if ( !empty($authData['username']) && !empty($authData['password'])) {
$request->addHeader('Authorization: Basic ' . base64_encode($authData['username']. ':' . $authData['password'] )); $request->addHeader('Authorization: Basic ' . base64_encode($authData['username']. ':' . $authData['password'] ));
......
...@@ -153,7 +153,7 @@ class PeclHttp extends Configurable implements AdapterInterface ...@@ -153,7 +153,7 @@ class PeclHttp extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility // Try endpoint authentication first, fallback to request for backwards compatibility
$authData = $endpoint->getAuthentication(); $authData = $endpoint->getAuthentication();
if(empty($authData['username'])) $authData = $request->getAuthentication(); if (empty($authData['username'])) $authData = $request->getAuthentication();
if ( !empty($authData['username']) && !empty($authData['password'])) { if ( !empty($authData['username']) && !empty($authData['password'])) {
$headers['Authorization'] = 'Basic ' . base64_encode($authData['username']. ':' . $authData['password'] ); $headers['Authorization'] = 'Basic ' . base64_encode($authData['username']. ':' . $authData['password'] );
......
...@@ -464,7 +464,7 @@ class Helper ...@@ -464,7 +464,7 @@ class Helper
*/ */
public function cacheControl($useCache, $cost = null) public function cacheControl($useCache, $cost = null)
{ {
if($useCache === true) { if ($useCache === true) {
$cache = 'true'; $cache = 'true';
} else { } else {
$cache = 'false'; $cache = 'false';
......
...@@ -107,7 +107,7 @@ class MoreLikeThis extends Component ...@@ -107,7 +107,7 @@ class MoreLikeThis extends Component
public function getFields() public function getFields()
{ {
$fields = $this->getOption('fields'); $fields = $this->getOption('fields');
if($fields == null) $fields = array(); if ($fields == null) $fields = array();
return $fields; return $fields;
} }
...@@ -306,7 +306,7 @@ class MoreLikeThis extends Component ...@@ -306,7 +306,7 @@ class MoreLikeThis extends Component
public function getQueryFields() public function getQueryFields()
{ {
$queryfields = $this->getOption('queryfields'); $queryfields = $this->getOption('queryfields');
if($queryfields == null) $queryfields = array(); if ($queryfields == null) $queryfields = array();
return $queryfields; return $queryfields;
} }
......
...@@ -119,7 +119,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf ...@@ -119,7 +119,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
} else { } else {
if ($queryObject->getResponseWriter() == $queryObject::WT_JSON) { if ($queryObject->getResponseWriter() == $queryObject::WT_JSON) {
if(is_array(current($values))){ if (is_array(current($values))){
foreach($values as $key => $value) { foreach($values as $key => $value) {
$values[$key] = $this->convertToKeyValueArray($value); $values[$key] = $this->convertToKeyValueArray($value);
} }
......
...@@ -66,7 +66,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt ...@@ -66,7 +66,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
$query = $result->getQuery(); $query = $result->getQuery();
// Special case to handle Solr 1.4 data // Special case to handle Solr 1.4 data
if(isset($data['terms']) && count($data['terms']) == count($query->getFields()) * 2) { if (isset($data['terms']) && count($data['terms']) == count($query->getFields()) * 2) {
$data['terms'] = $this->convertToKeyValueArray($data['terms']); $data['terms'] = $this->convertToKeyValueArray($data['terms']);
} }
......
...@@ -169,7 +169,7 @@ class RequestBuilder extends BaseRequestBuilder ...@@ -169,7 +169,7 @@ class RequestBuilder extends BaseRequestBuilder
$xml = '<field name="' . $name . '"'; $xml = '<field name="' . $name . '"';
$xml .= $this->attrib('boost', $boost); $xml .= $this->attrib('boost', $boost);
$xml .= $this->attrib('update', $modifier); $xml .= $this->attrib('update', $modifier);
if($value === null){ if ($value === null){
$xml .= $this->attrib('null', 'true'); $xml .= $this->attrib('null', 'true');
} }
$xml .= '>' . htmlspecialchars($value, ENT_NOQUOTES, 'UTF-8'); $xml .= '>' . htmlspecialchars($value, ENT_NOQUOTES, 'UTF-8');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment