WildcardQuery::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
namespace olvlvl\ElasticsearchDSL\Query\Term;
4
5
use olvlvl\ElasticsearchDSL\Query\Helpers\JsonSerializeAsSimpleOrExtended;
6
use olvlvl\ElasticsearchDSL\Query\Option\BoostOption;
7
use olvlvl\ElasticsearchDSL\Query\Option\HasBoostOption;
8
use olvlvl\ElasticsearchDSL\Query\QueryAbstract;
9
10
/**
11
 * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-wildcard-query.html
12
 */
13
class WildcardQuery extends QueryAbstract implements HasBoostOption
14
{
15
	use BoostOption;
16
	use JsonSerializeAsSimpleOrExtended {
17
		jsonSerializeAsSimpleOrExtended as public jsonSerialize;
18
	}
19
20
	const NAME = 'wildcard';
21
22
	/**
23
	 * @var string
24
	 */
25
	private $field;
26
27
	/**
28
	 * @var mixed
29
	 */
30
	private $value;
31
32
	public function __construct(string $field, $value)
33
	{
34
		$this->field = $field;
35
		$this->value = $value;
36
	}
37
}
38