Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
Selectively picking some fixes from 418f3fb,
related to #689
  • Loading branch information
polyfractal committed Dec 5, 2017
1 parent 6ffdef8 commit 0106351
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface SelectorInterface
/**
* Perform logic to select a single ConnectionInterface instance from the array provided
*
* @param ConnectionInterface[] $connections an array of ConnectionInterface instances to choose from
* @param \Elasticsearch\Connections\ConnectionInterface[] $connections an array of ConnectionInterface instances to choose from
*
* @return \Elasticsearch\Connections\ConnectionInterface
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Elasticsearch/Serializers/SmartSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Elasticsearch\Serializers;

use Elasticsearch\Common\Exceptions;
use Elasticsearch\Common\Exceptions\Serializer\JsonErrorException;

/**
Expand Down Expand Up @@ -29,7 +30,7 @@ public function serialize($data)
} else {
$data = json_encode($data, JSON_PRESERVE_ZERO_FRACTION);
if ($data === false) {
throw new RuntimeException("Failed to JSON encode: ".json_last_error());
throw new Exceptions\RuntimeException("Failed to JSON encode: ".json_last_error());
}
if ($data === '[]') {
return '{}';
Expand Down

0 comments on commit 0106351

Please sign in to comment.