Permalink
Browse files

cs fixes

  • Loading branch information...
maxiloc committed Jun 28, 2016
1 parent 211b36e commit 29d1bffb1260f4fcca61229151410ad210833be4
Showing with 11 additions and 12 deletions.
  1. +1 −1 example/index.php
  2. +7 −7 src/AlgoliaSearch/Client.php
  3. +3 −3 src/AlgoliaSearch/Index.php
  4. +0 −1 tests/AlgoliaSearch/Tests/SettingsTest.php
View
@@ -4,4 +4,4 @@
$client = new \AlgoliaSearch\Client('<YOUR_APP_ID>', '<YOUR_API_KEY>');
var_dump($client->listIndexes());
var_dump($client->getLogs());
var_dump($client->getLogs());
@@ -809,17 +809,17 @@ public function doRequest(
if ($context->adminAPIKey == null) {
$defaultHeaders = array(
'X-Algolia-Application-Id' => $context->applicationID,
'X-Algolia-API-Key' => $context->apiKey,
'Content-type' => 'application/json',
'X-Algolia-API-Key' => $context->apiKey,
'Content-type' => 'application/json',
);
} else {
$defaultHeaders = array(
'X-Algolia-Application-Id' => $context->applicationID,
'X-Algolia-API-Key' => $context->adminAPIKey,
'X-Forwarded-For' => $context->endUserIP,
'X-Algolia-UserToken' => $context->algoliaUserToken,
'X-Forwarded-API-Key' => $context->rateLimitAPIKey,
'Content-type' => 'application/json',
'X-Algolia-API-Key' => $context->adminAPIKey,
'X-Forwarded-For' => $context->endUserIP,
'X-Algolia-UserToken' => $context->algoliaUserToken,
'X-Forwarded-API-Key' => $context->rateLimitAPIKey,
'Content-type' => 'application/json',
);
}
@@ -381,7 +381,7 @@ public function deleteObjects($objects)
* param if you trigger the timeout of the search, in that case you won't remove all
* the records
*
* @return int the number of delete operations
* @return int the number of delete operations
*/
public function deleteByQuery($query, $args = array(), $waitLastCall = true)
{
@@ -789,7 +789,7 @@ public function clearIndex()
* - optionalWords: (array of strings) Specify a list of words that should be considered as
* optional when found in the query.
*
* @param bool $forwardToSlaves
* @param bool $forwardToSlaves
* @return mixed
* @throws AlgoliaException
*/
@@ -798,7 +798,7 @@ public function setSettings($settings, $forwardToSlaves = false)
$url = '/1/indexes/'.$this->urlIndexName.'/settings';
if ($forwardToSlaves) {
$url = $url . '?forwardToSlaves=true';
$url = $url.'?forwardToSlaves=true';
}
return $this->client->request(
@@ -58,7 +58,6 @@ public function testSettingsIndexWithForwardToSlaves()
$slaveIndex = $this->client->initIndex($this->safe_name('àlgol?à-php-slave'));
$settings = $slaveIndex->getSettings();
$this->assertEquals(count($settings['attributesToRetrieve']), 1);
$this->assertEquals($settings['attributesToRetrieve'][0], 'firstname');
}

0 comments on commit 29d1bff

Please sign in to comment.