MatchAllQuery::jsonSerialize()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace olvlvl\ElasticsearchDSL\Query\Text;
4
5
use olvlvl\ElasticsearchDSL\Query\Option\BoostOption;
6
use olvlvl\ElasticsearchDSL\Query\Option\HasBoostOption;
7
use olvlvl\ElasticsearchDSL\Query\QueryAbstract;
8
9
class MatchAllQuery extends QueryAbstract implements HasBoostOption
10
{
11
	use BoostOption;
12
13
	const NAME = 'match_all';
14
15
	/**
16
	 * @inheritdoc
17
	 */
18
	public function jsonSerialize()
19
	{
20
		return [ self::NAME => parent::jsonSerialize() ?: (object) [] ];
21
	}
22
}
23