Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove setId() into Endpoints, fixes #1017 #1026

Merged
merged 2 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

env:
global:
- STACK_VERSION="7.7.0-SNAPSHOT"
- STACK_VERSION="7.7-SNAPSHOT"

before_install:
- ./travis/run_es_docker.sh
Expand Down
4 changes: 2 additions & 2 deletions src/Elasticsearch/Endpoints/AbstractEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function setType(?string $type)
*
* @return $this
*/
public function setID($docID)
public function setId($docID)
{
if ($docID === null) {
return $this;
Expand All @@ -169,7 +169,7 @@ public function setID($docID)
if (is_int($docID)) {
$docID = (string) $docID;
}

$this->id = urlencode($docID);

return $this;
Expand Down
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/AsyncSearch/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,4 @@ public function getMethod(): string
{
return 'DELETE';
}

public function setId($id): Delete
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/AsyncSearch/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): Get
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Cat/MlDataFrameAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): MlDataFrameAnalytics
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,4 @@ public function setBody($body): Create

return $this;
}

public function setId($id): Create
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,4 @@ public function getMethod(): string
{
return 'DELETE';
}

public function setId($id): Delete
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/DeleteScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,4 @@ public function getMethod(): string
{
return 'DELETE';
}

public function setId($id): DeleteScript
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Exists.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,4 @@ public function getMethod(): string
{
return 'HEAD';
}

public function setId($id): Exists
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/ExistsSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,4 @@ public function getMethod(): string
{
return 'HEAD';
}

public function setId($id): ExistsSource
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Explain.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,4 @@ public function setBody($body): Explain

return $this;
}

public function setId($id): Explain
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): Get
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/GetScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): GetScript
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/GetSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): GetSource
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,4 @@ public function setBody($body): Index

return $this;
}

public function setId($id): Index
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,4 @@ public function getMethod(): string
{
return 'DELETE';
}

public function setId($id): DeletePipeline
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ingest/GetPipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): GetPipeline
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ingest/PutPipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,4 @@ public function setBody($body): PutPipeline

return $this;
}

public function setId($id): PutPipeline
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ingest/Simulate.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,4 @@ public function setBody($body): Simulate

return $this;
}

public function setId($id): Simulate
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ml/DeleteDataFrameAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,4 @@ public function getMethod(): string
{
return 'DELETE';
}

public function setId($id): DeleteDataFrameAnalytics
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ml/ExplainDataFrameAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,4 @@ public function setBody($body): ExplainDataFrameAnalytics

return $this;
}

public function setId($id): ExplainDataFrameAnalytics
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): GetDataFrameAnalytics
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,4 @@ public function getMethod(): string
{
return 'GET';
}

public function setId($id): GetDataFrameAnalyticsStats
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,4 @@ public function setBody($body): PutDataFrameAnalytics

return $this;
}

public function setId($id): PutDataFrameAnalytics
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ml/StartDataFrameAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,4 @@ public function setBody($body): StartDataFrameAnalytics

return $this;
}

public function setId($id): StartDataFrameAnalytics
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
10 changes: 0 additions & 10 deletions src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,4 @@ public function setBody($body): StopDataFrameAnalytics

return $this;
}

public function setId($id): StopDataFrameAnalytics
{
if (isset($id) !== true) {
return $this;
}
$this->id = $id;

return $this;
}
}
Loading