Skip to content

Commit cb6b628

Browse files
committed
Fixed CS issue
1 parent 977b3ed commit cb6b628

File tree

466 files changed

+7309
-3648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

466 files changed

+7309
-3648
lines changed

src/Elasticsearch/Client.php

Lines changed: 90 additions & 86 deletions
Large diffs are not rendered by default.

src/Elasticsearch/ClientBuilder.php

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216

317
declare(strict_types = 1);
418

@@ -25,15 +39,6 @@
2539
use Psr\Log\LoggerInterface;
2640
use Psr\Log\NullLogger;
2741

28-
/**
29-
* Class ClientBuilder
30-
*
31-
* @category Elasticsearch
32-
* @package Elasticsearch\Common\Exceptions
33-
* @author Zachary Tong <[email protected]>
34-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
35-
* @link http://elastic.co
36-
*/
3742
class ClientBuilder
3843
{
3944
/**
@@ -129,7 +134,7 @@ class ClientBuilder
129134
private $sslVerification = null;
130135

131136
/**
132-
* @var bool
137+
* @var bool
133138
*/
134139
private $includePortInHostHeader = false;
135140

@@ -340,8 +345,6 @@ public function setHosts(array $hosts): ClientBuilder
340345
/**
341346
* Set the APIKey Pair, consiting of the API Id and the ApiKey of the Response from /_security/api_key
342347
*
343-
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
344-
*
345348
* @throws AuthenticationConfigException
346349
*/
347350
public function setApiKey(string $id, string $apiKey): ClientBuilder
@@ -386,20 +389,20 @@ public function setBasicAuthentication(string $username, string $password): Clie
386389
/**
387390
* Set Elastic Cloud ID to connect to Elastic Cloud
388391
*
389-
* @link https://elastic.co/cloud
390-
*
391392
* @param string $cloudId
392393
*/
393394
public function setElasticCloudId(string $cloudId): ClientBuilder
394395
{
395396
// Register the Hosts array
396-
$this->setHosts([
397+
$this->setHosts(
398+
[
397399
[
398400
'host' => $this->parseElasticCloudId($cloudId),
399401
'port' => '',
400402
'scheme' => 'https',
401403
]
402-
]);
404+
]
405+
);
403406

404407
if (!isset($this->connectionParams['client']['curl'][CURLOPT_ENCODING])) {
405408
// Merge best practices for the connection (enable gzip)
@@ -461,7 +464,7 @@ public function setSSLKey(string $key, string $password = null): ClientBuilder
461464
}
462465

463466
/**
464-
* @param bool|string $value
467+
* @param bool|string $value
465468
*/
466469
public function setSSLVerification($value = true): ClientBuilder
467470
{
@@ -472,6 +475,7 @@ public function setSSLVerification($value = true): ClientBuilder
472475

473476
/**
474477
* Include the port in Host header
478+
*
475479
* @see https://github.com/elastic/elasticsearch-php/issues/993
476480
*/
477481
public function includePortInHostHeader(bool $enable): ClientBuilder

src/Elasticsearch/Common/EmptyLogger.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216

317
declare(strict_types = 1);
418

@@ -12,12 +26,6 @@
1226
*
1327
* Logger that doesn't do anything. Similar to Monolog's NullHandler,
1428
* but avoids the overhead of partially loading Monolog
15-
*
16-
* @category Elasticsearch
17-
* @package Elasticsearch\Common
18-
* @author Zachary Tong <[email protected]>
19-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
20-
* @link http://elastic.co
2129
*/
2230
class EmptyLogger extends AbstractLogger implements LoggerInterface
2331
{
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216
declare(strict_types = 1);
317

418
// Licensed to Elasticsearch B.V under one or more agreements.
@@ -7,15 +21,6 @@
721

822
namespace Elasticsearch\Common\Exceptions;
923

10-
/**
11-
* AuthenticationConfigException
12-
*
13-
* @category Elasticsearch
14-
* @package Elasticsearch\Common\Exceptions
15-
* @author Philip Krauss <[email protected]>
16-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
17-
* @link http://elastic.co
18-
*/
1924
class AuthenticationConfigException extends \RuntimeException implements ElasticsearchException
2025
{
2126
}

src/Elasticsearch/Common/Exceptions/BadMethodCallException.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216

317
declare(strict_types = 1);
418

@@ -8,12 +22,6 @@
822
* BadMethodCallException
923
*
1024
* Denote problems with a method call (e.g. incorrect number of arguments)
11-
*
12-
* @category Elasticsearch
13-
* @package Elasticsearch\Common\Exceptions
14-
* @author Zachary Tong <[email protected]>
15-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
16-
* @link http://elastic.co
1725
*/
1826
class BadMethodCallException extends \BadMethodCallException implements ElasticsearchException
1927
{
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216

317
declare(strict_types = 1);
418

519
namespace Elasticsearch\Common\Exceptions;
620

7-
/**
8-
* BadRequest400Exception, thrown on 400 conflict http error
9-
*
10-
* @category Elasticsearch
11-
* @package Elasticsearch\Common\Exceptions
12-
* @author Zachary Tong <[email protected]>
13-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
14-
* @link http://elastic.co
15-
*/
1621
class BadRequest400Exception extends \Exception implements ElasticsearchException
1722
{
1823
}
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216

317
declare(strict_types = 1);
418

519
namespace Elasticsearch\Common\Exceptions;
620

7-
/**
8-
* Class ClientErrorResponseException
9-
*
10-
* @category Elasticsearch
11-
* @package Elasticsearch\Common\Exceptions
12-
* @author Zachary Tong <[email protected]>
13-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
14-
* @link http://elastic.co
15-
*/
1621
class ClientErrorResponseException extends TransportException implements ElasticsearchException
1722
{
1823
}
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216

317
declare(strict_types = 1);
418

519
namespace Elasticsearch\Common\Exceptions;
620

7-
/**
8-
* Conflict409Exception, thrown on 409 conflict http error
9-
*
10-
* @category Elasticsearch
11-
* @package Elasticsearch\Common\Exceptions
12-
* @author Zachary Tong <[email protected]>
13-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
14-
* @link http://elastic.co
15-
*/
1621
class Conflict409Exception extends \Exception implements ElasticsearchException
1722
{
1823
}
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216

317
declare(strict_types = 1);
418

@@ -7,15 +21,6 @@
721
use Elasticsearch\Common\Exceptions\ElasticsearchException;
822
use Elasticsearch\Common\Exceptions\TransportException;
923

10-
/**
11-
* Class CouldNotConnectToHost
12-
*
13-
* @category Elasticsearch
14-
* @package Elasticsearch\Common\Exceptions\Curl
15-
* @author Zachary Tong <[email protected]>
16-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
17-
* @link http://elastic.co
18-
*/
1924
class CouldNotConnectToHost extends TransportException implements ElasticsearchException
2025
{
2126
}
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
<?php
2+
/**
3+
* Elasticsearch PHP client
4+
*
5+
* @link https://github.com/elastic/elasticsearch-php/
6+
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
7+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8+
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
9+
*
10+
* Licensed to Elasticsearch B.V under one or more agreements.
11+
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
12+
* the GNU Lesser General Public License, Version 2.1, at your option.
13+
* See the LICENSE file in the project root for more information.
14+
*/
15+
216

317
declare(strict_types = 1);
418

@@ -7,15 +21,6 @@
721
use Elasticsearch\Common\Exceptions\ElasticsearchException;
822
use Elasticsearch\Common\Exceptions\TransportException;
923

10-
/**
11-
* Class CouldNotResolveHostException
12-
*
13-
* @category Elasticsearch
14-
* @package Elasticsearch\Common\Exceptions\Curl
15-
* @author Zachary Tong <[email protected]>
16-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
17-
* @link http://elastic.co
18-
*/
1924
class CouldNotResolveHostException extends TransportException implements ElasticsearchException
2025
{
2126
}

0 commit comments

Comments
 (0)