File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11parameters :
22 ignoreErrors :
3- - "Call to function array_key_exists\ ( \ ) with string and array\ <int , mixed\ > will always evaluate to false. "
3+ - "# Call to function array_key_exists\\ ( \\ ) with string and array<int , mixed> will always evaluate to false # "
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class Hit
2727 */
2828 private $ id ;
2929 /**
30- * @var string
30+ * @var float
3131 */
3232 private $ score ;
3333
@@ -38,7 +38,7 @@ public function __construct(
3838 , string $ index
3939 , string $ type
4040 , string $ id
41- , string $ score
41+ , float $ score
4242 )
4343 {
4444 $ this ->source = $ source ;
@@ -88,7 +88,7 @@ public function id() : string
8888 }
8989
9090
91- public function score () : string
91+ public function score () : float
9292 {
9393 return $ this ->score ;
9494 }
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ public function mapHits(
2424 ) : \Spameri \ElasticQuery \Response \Result \HitCollection
2525 {
2626 $ hits = [];
27- foreach ($ elasticSearchResponse ['hits ' ] as $ hitPosition => $ hit ) {
28- $ hits [] = $ this ->mapHit ($ hit , $ hitPosition );
27+ foreach ($ elasticSearchResponse ['hits ' ][ ' hits ' ] as $ hitPosition => $ hit ) {
28+ $ hits [] = $ this ->mapHit ($ hit , ( int ) $ hitPosition );
2929 }
3030
3131 return new \Spameri \ElasticQuery \Response \Result \HitCollection (
@@ -66,6 +66,7 @@ public function mapAggregations(
6666 );
6767 }
6868
69+
6970 private function mapAggregation (
7071 string $ name
7172 , int $ position
You can’t perform that action at this time.
0 commit comments