Skip to content

Commit 8b1a713

Browse files
committed
fix(specs): recommend is optional (generated)
algolia/api-clients-automation#3967 Co-authored-by: algolia-bot <[email protected]>
1 parent b83b2c4 commit 8b1a713

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

lib/Model/Recommend/RecommendHit.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,6 @@ public function listInvalidProperties()
184184
if (!isset($this->container['objectID']) || null === $this->container['objectID']) {
185185
$invalidProperties[] = "'objectID' can't be null";
186186
}
187-
if (!isset($this->container['score']) || null === $this->container['score']) {
188-
$invalidProperties[] = "'score' can't be null";
189-
}
190187

191188
return $invalidProperties;
192189
}
@@ -325,7 +322,7 @@ public function setDistinctSeqID($distinctSeqID)
325322
/**
326323
* Gets score.
327324
*
328-
* @return float
325+
* @return null|float
329326
*/
330327
public function getScore()
331328
{
@@ -335,7 +332,7 @@ public function getScore()
335332
/**
336333
* Sets score.
337334
*
338-
* @param float $score recommendation score
335+
* @param null|float $score recommendation score
339336
*
340337
* @return self
341338
*/

lib/Model/Recommend/RecommendationsHit.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,6 @@ public function listInvalidProperties()
198198
if (!isset($this->container['objectID']) || null === $this->container['objectID']) {
199199
$invalidProperties[] = "'objectID' can't be null";
200200
}
201-
if (!isset($this->container['score']) || null === $this->container['score']) {
202-
$invalidProperties[] = "'score' can't be null";
203-
}
204201
if (!isset($this->container['facetName']) || null === $this->container['facetName']) {
205202
$invalidProperties[] = "'facetName' can't be null";
206203
}
@@ -345,7 +342,7 @@ public function setDistinctSeqID($distinctSeqID)
345342
/**
346343
* Gets score.
347344
*
348-
* @return float
345+
* @return null|float
349346
*/
350347
public function getScore()
351348
{
@@ -355,7 +352,7 @@ public function getScore()
355352
/**
356353
* Sets score.
357354
*
358-
* @param float $score recommendation score
355+
* @param null|float $score recommendation score
359356
*
360357
* @return self
361358
*/

lib/Model/Recommend/TrendingFacetHit.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ public function listInvalidProperties()
157157
{
158158
$invalidProperties = [];
159159

160-
if (!isset($this->container['score']) || null === $this->container['score']) {
161-
$invalidProperties[] = "'score' can't be null";
162-
}
163160
if (!isset($this->container['facetName']) || null === $this->container['facetName']) {
164161
$invalidProperties[] = "'facetName' can't be null";
165162
}
@@ -184,7 +181,7 @@ public function valid()
184181
/**
185182
* Gets score.
186183
*
187-
* @return float
184+
* @return null|float
188185
*/
189186
public function getScore()
190187
{
@@ -194,7 +191,7 @@ public function getScore()
194191
/**
195192
* Sets score.
196193
*
197-
* @param float $score recommendation score
194+
* @param null|float $score recommendation score
198195
*
199196
* @return self
200197
*/

0 commit comments

Comments
 (0)