Skip to content

Commit 2e4100a

Browse files
committed
Fixed conflict with master
2 parents fdea372 + 20f5b26 commit 2e4100a

File tree

12 files changed

+83
-22
lines changed

12 files changed

+83
-22
lines changed

src/Elasticsearch/ClientBuilder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ class ClientBuilder
5656
*/
5757
private $connectionFactory;
5858

59+
/**
60+
* @var callable
61+
*/
5962
private $handler;
6063

6164
/**

src/Elasticsearch/Common/Exceptions/AlreadyExpiredException.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/Elasticsearch/Common/Exceptions/Serializer/JsonErrorException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class JsonErrorException extends \Exception implements ElasticsearchException
2727
*/
2828
private $result;
2929

30+
/**
31+
* @var string[]
32+
*/
3033
private static $messages = array(
3134
JSON_ERROR_DEPTH => 'The maximum stack depth has been exceeded',
3235
JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON',

src/Elasticsearch/Connections/Connection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Elasticsearch\Connections;
66

77
use Elasticsearch\Client;
8-
use Elasticsearch\Common\Exceptions\AlreadyExpiredException;
98
use Elasticsearch\Common\Exceptions\BadRequest400Exception;
109
use Elasticsearch\Common\Exceptions\Conflict409Exception;
1110
use Elasticsearch\Common\Exceptions\Curl\CouldNotConnectToHost;
@@ -110,6 +109,9 @@ class Connection implements ConnectionInterface
110109
*/
111110
private $failedPings = 0;
112111

112+
/**
113+
* @var mixed[]
114+
*/
113115
private $lastRequest = array();
114116

115117
/**
@@ -611,9 +613,7 @@ private function process4xxError(array $request, array $response, array $ignore)
611613
$responseBody = json_encode($responseBody);
612614
}
613615

614-
if ($statusCode === 400 && strpos($responseBody, "AlreadyExpiredException") !== false) {
615-
$exception = new AlreadyExpiredException($responseBody, $statusCode);
616-
} elseif ($statusCode === 403) {
616+
if ($statusCode === 403) {
617617
$exception = new Forbidden403Exception($responseBody, $statusCode);
618618
} elseif ($statusCode === 404) {
619619
$exception = new Missing404Exception($responseBody, $statusCode);

src/Elasticsearch/Endpoints/Cat/Snapshots.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,25 @@
1818
*/
1919
class Snapshots extends AbstractEndpoint
2020
{
21+
<<<<<<< HEAD
2122
protected $repository;
23+
=======
24+
/**
25+
* @var string
26+
*/
27+
private $repository;
28+
29+
public function setRepository(?string $repository): Snapshots
30+
{
31+
if (isset($repository) !== true) {
32+
return $this;
33+
}
34+
35+
$this->repository = $repository;
36+
37+
return $this;
38+
}
39+
>>>>>>> elasticsearch-php/master
2240

2341
public function getURI(): string
2442
{

src/Elasticsearch/Endpoints/Cat/Templates.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,20 @@
1818
*/
1919
class Templates extends AbstractEndpoint
2020
{
21+
<<<<<<< HEAD
2122
protected $name;
23+
=======
24+
/**
25+
* @var string|null
26+
*/
27+
private $name;
28+
29+
public function setName(?string $name): Templates
30+
{
31+
$this->name = $name;
32+
return $this;
33+
}
34+
>>>>>>> elasticsearch-php/master
2235

2336
public function getURI(): string
2437
{

src/Elasticsearch/Endpoints/Cat/ThreadPool.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,22 @@
1818
*/
1919
class ThreadPool extends AbstractEndpoint
2020
{
21+
<<<<<<< HEAD
2122
protected $thread_pool_patterns;
23+
=======
24+
/**
25+
* @var string
26+
*/
27+
protected $threadPoolPatterns;
28+
29+
public function setThreadPoolPatterns(?string $threadPoolPatterns): ThreadPool
30+
{
31+
if ($threadPoolPatterns !== null) {
32+
$this->threadPoolPatterns = $threadPoolPatterns;
33+
}
34+
return $this;
35+
}
36+
>>>>>>> elasticsearch-php/master
2237

2338
public function getURI(): string
2439
{

tests/Elasticsearch/Tests/ClientBuilder/ArrayLogger.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
class ArrayLogger implements LoggerInterface
1010
{
11+
/**
12+
* @var mixed[]
13+
*/
1114
public $output = [];
1215

1316
public function emergency($message, array $context = array())

tests/Elasticsearch/Tests/Connections/ConnectionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@
1212

1313
class ConnectionTest extends \PHPUnit\Framework\TestCase
1414
{
15+
/**
16+
* @var \PHPUnit\Framework\MockObject\MockObject&\Psr\Log\LoggerInterface
17+
*/
1518
private $logger;
19+
/**
20+
* @var \PHPUnit\Framework\MockObject\MockObject&\Psr\Log\LoggerInterface
21+
*/
1622
private $trace;
23+
/**
24+
* @var \Elasticsearch\Serializers\SerializerInterface&\PHPUnit\Framework\MockObject\MockObject
25+
*/
1726
private $serializer;
1827

1928
protected function setUp()

tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
class AbstractEndpointTest extends \PHPUnit\Framework\TestCase
1010
{
11+
/**
12+
* @var \Elasticsearch\Endpoints\AbstractEndpoint&\PHPUnit\Framework\MockObject\MockObject
13+
*/
1114
private $endpoint;
1215

1316
protected function setUp()

0 commit comments

Comments
 (0)