1111class Term implements LeafAggregationInterface
1212{
1313
14- private int |null $ missing ;
15-
1614 private \Spameri \ElasticQuery \Aggregation \Terms \OrderCollection $ order ;
1715
1816 public function __construct (
1917 private string $ field ,
2018 private int $ size = 0 ,
21- int $ missing = NULL ,
22- \Spameri \ElasticQuery \Aggregation \Terms \OrderCollection |null $ order = NULL ,
23- private string |null $ include = NULL ,
24- private string |null $ exclude = NULL ,
25- private string |null $ key = NULL ,
19+ private int | null $ missing = null ,
20+ \Spameri \ElasticQuery \Aggregation \Terms \OrderCollection |null $ order = null ,
21+ private string |null $ include = null ,
22+ private string |null $ exclude = null ,
23+ private string |null $ key = null ,
2624 )
2725 {
28- $ this ->missing = $ missing ;
2926 $ this ->order = $ order ?? new \Spameri \ElasticQuery \Aggregation \Terms \OrderCollection ();
3027 }
3128
@@ -43,22 +40,22 @@ public function toArray(): array
4340 ];
4441
4542 if ($ this ->size > 0 ) {
46- $ array ['size ' ] = $ this ->size ;
43+ $ array ['size ' ] = $ this ->size ;
4744 }
4845
49- if ($ this ->missing !== NULL ) {
46+ if ($ this ->missing !== null ) {
5047 $ array ['missing ' ] = $ this ->missing ;
5148 }
5249
5350 if (\count ($ this ->order )) {
5451 $ array ['order ' ] = $ this ->order ->toArray ();
5552 }
5653
57- if ($ this ->include !== NULL ) {
54+ if ($ this ->include !== null ) {
5855 $ array ['include ' ] = $ this ->include ;
5956 }
6057
61- if ($ this ->exclude !== NULL ) {
58+ if ($ this ->exclude !== null ) {
6259 $ array ['exclude ' ] = $ this ->exclude ;
6360 }
6461
0 commit comments