Skip to content

Commit 112375c

Browse files
committed
type is deprecated in es7
1 parent 2345bc2 commit 112375c

File tree

8 files changed

+7
-25
lines changed

8 files changed

+7
-25
lines changed

src/Document.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ class Document implements \Spameri\ElasticQuery\Entity\ArrayInterface
1616
*/
1717
private $body;
1818

19-
/**
20-
* @var ?string
21-
*/
22-
private $type;
23-
2419
/**
2520
* @var ?string
2621
*/
@@ -35,14 +30,12 @@ class Document implements \Spameri\ElasticQuery\Entity\ArrayInterface
3530
public function __construct(
3631
?string $index
3732
, ?\Spameri\ElasticQuery\Document\BodyInterface $body = NULL
38-
, ?string $type = NULL
3933
, ?string $id = NULL
4034
, array $options = []
4135
)
4236
{
4337
$this->index = $index;
4438
$this->body = $body;
45-
$this->type = $type;
4639
$this->id = $id;
4740
$this->options = $options;
4841
}
@@ -66,10 +59,6 @@ public function toArray() : array
6659
$array['body'] = $this->body->toArray();
6760
}
6861

69-
if ($this->type) {
70-
$array['type'] = $this->type;
71-
}
72-
7362
if ($this->id) {
7463
$array['id'] = $this->id;
7564
}

tests/SpameriTests/ElasticQuery/Query/Fuzzy.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ class Fuzzy extends \Tester\TestCase
5656
)
5757
)
5858
)->toArray()
59-
),
60-
self::SPAMERI_VIDEO
59+
)
6160
);
6261

6362
$ch = curl_init();

tests/SpameriTests/ElasticQuery/Query/Match.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ class Match extends \Tester\TestCase
6060
)
6161
)
6262
)->toArray()
63-
),
64-
self::SPAMERI_VIDEO
63+
)
6564
);
6665

6766
$ch = curl_init();

tests/SpameriTests/ElasticQuery/Query/MatchPhrase.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ class MatchPhrase extends \Tester\TestCase
5454
)
5555
)
5656
)->toArray()
57-
),
58-
self::SPAMERI_VIDEO
57+
)
5958
);
6059

6160
$ch = curl_init();

tests/SpameriTests/ElasticQuery/Query/Range.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ class Range extends \Tester\TestCase
5252
)
5353
)
5454
)->toArray()
55-
),
56-
self::SPAMERI_VIDEO
55+
)
5756
);
5857

5958
$ch = curl_init();

tests/SpameriTests/ElasticQuery/Query/Term.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ class Term extends \Tester\TestCase
5050
)
5151
)
5252
)->toArray()
53-
),
54-
self::SPAMERI_VIDEO
53+
)
5554
);
5655

5756
$ch = curl_init();

tests/SpameriTests/ElasticQuery/Query/Terms.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ class Terms extends \Tester\TestCase
4949
)
5050
)
5151
)->toArray()
52-
),
53-
self::SPAMERI_VIDEO
52+
)
5453
);
5554

5655
$ch = curl_init();

tests/SpameriTests/ElasticQuery/Query/WildCard.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ class WildCard extends \Tester\TestCase
5050
)
5151
)
5252
)->toArray()
53-
),
54-
self::SPAMERI_VIDEO
53+
)
5554
);
5655

5756
$ch = curl_init();

0 commit comments

Comments
 (0)