@@ -15,7 +15,7 @@ class Aggregation
1515 public static function terms (
1616 string $ name ,
1717 string |Field |InlineScript $ fieldOrSource ,
18- array $ aggregations = []
18+ array $ aggregations = [],
1919 ): TermsAggregation {
2020 return new TermsAggregation ($ name , $ fieldOrSource , $ aggregations );
2121 }
@@ -27,7 +27,7 @@ public static function dateHistogram(
2727 string $ nameAndField ,
2828 string $ calendarInterval ,
2929 ?string $ field = null ,
30- array $ aggregations = []
30+ array $ aggregations = [],
3131 ): DateHistogramAggregation {
3232 return new DateHistogramAggregation ($ nameAndField , $ calendarInterval , $ field , $ aggregations );
3333 }
@@ -43,7 +43,7 @@ public static function nested(string $name, string $path, array $aggregations =
4343 /**
4444 * @param array<AbstractAggregation> $aggregations
4545 */
46- public static function reverseNested (string $ name , string $ path , array $ aggregations = []): ReverseNestedAggregation
46+ public static function reverseNested (string $ name , ? string $ path = null , array $ aggregations = []): ReverseNestedAggregation
4747 {
4848 return new ReverseNestedAggregation ($ name , $ path , $ aggregations );
4949 }
@@ -62,7 +62,7 @@ public static function filter(string $name, QueryInterface $query, array $aggreg
6262 public static function cardinality (
6363 string $ nameAndField ,
6464 string |SourceScript |Field |null $ fieldOrSource = null ,
65- array $ aggregations = []
65+ array $ aggregations = [],
6666 ): CardinalityAggregation {
6767 return new CardinalityAggregation ($ nameAndField , $ fieldOrSource , $ aggregations );
6868 }
@@ -73,7 +73,7 @@ public static function cardinality(
7373 public static function max (
7474 string $ nameAndField ,
7575 string |SourceScript |Field |null $ fieldOrSource = null ,
76- array $ aggregations = []
76+ array $ aggregations = [],
7777 ): MaxAggregation {
7878 return new MaxAggregation ($ nameAndField , $ fieldOrSource , $ aggregations );
7979 }
@@ -84,7 +84,7 @@ public static function max(
8484 public static function min (
8585 string $ nameAndField ,
8686 string |SourceScript |Field |null $ fieldOrSource = null ,
87- array $ aggregations = []
87+ array $ aggregations = [],
8888 ): MinAggregation {
8989 return new MinAggregation ($ nameAndField , $ fieldOrSource , $ aggregations );
9090 }
@@ -95,7 +95,7 @@ public static function min(
9595 public static function sum (
9696 string $ nameAndField ,
9797 string |SourceScript |Field |null $ fieldOrSource = null ,
98- array $ aggregations = []
98+ array $ aggregations = [],
9999 ): SumAggregation {
100100 return new SumAggregation ($ nameAndField , $ fieldOrSource , $ aggregations );
101101 }
0 commit comments