Completed
Push — master ( c0d232...67b20e )
by Olivier
43:39 queued 05:10
created

Query::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace olvlvl\ElasticsearchDSL;
4
5
use ICanBoogie\Accessor\AccessorTrait;
6
use olvlvl\ElasticsearchDSL\Query\QueryCollection;
7
8
class Query extends QueryCollection
9
{
10
	use AccessorTrait;
11
12
	const NAME = 'query';
13
14
	/**
15
	 * @inheritdoc
16
	 */
17
	public function jsonSerialize()
18
	{
19
		return [ self::NAME => parent::jsonSerialize() ];
20
	}
21
22
	public function to_array(): array
23
	{
24
		return json_decode(json_encode($this));
25
	}
26
}
27