We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8925747 commit 460ff7dCopy full SHA for 460ff7d
src/Aggregation/Min.php
@@ -0,0 +1,36 @@
1
+<?php declare(strict_types = 1);
2
+
3
+namespace Spameri\ElasticQuery\Aggregation;
4
5
+class Min implements \Spameri\ElasticQuery\Aggregation\LeafAggregationInterface
6
+{
7
8
+ private string $field;
9
10
11
+ public function __construct(
12
+ string $field
13
+ ) {
14
+ $this->field = $field;
15
+ }
16
17
18
+ public function key(): string
19
+ {
20
+ return 'min_' . $this->field;
21
22
23
24
+ /**
25
+ * @return array<string, mixed>
26
+ */
27
+ public function toArray(): array
28
29
+ return [
30
+ 'min' => [
31
+ 'field' => $this->field,
32
+ ],
33
+ ];
34
35
36
+}
0 commit comments