Skip to content

Commit 79e704a

Browse files
algolia-botmillotp
andcommitted
fix(specs): allow one sided rule validity (generated)
algolia/api-clients-automation#5060 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 0ea4c8f commit 79e704a

File tree

2 files changed

+10
-28
lines changed

2 files changed

+10
-28
lines changed

lib/Model/Recommend/TimeRange.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,7 @@ public static function getters()
145145
*/
146146
public function listInvalidProperties()
147147
{
148-
$invalidProperties = [];
149-
150-
if (!isset($this->container['from']) || null === $this->container['from']) {
151-
$invalidProperties[] = "'from' can't be null";
152-
}
153-
if (!isset($this->container['until']) || null === $this->container['until']) {
154-
$invalidProperties[] = "'until' can't be null";
155-
}
156-
157-
return $invalidProperties;
148+
return [];
158149
}
159150

160151
/**
@@ -171,7 +162,7 @@ public function valid()
171162
/**
172163
* Gets from.
173164
*
174-
* @return int
165+
* @return null|int
175166
*/
176167
public function getFrom()
177168
{
@@ -181,7 +172,7 @@ public function getFrom()
181172
/**
182173
* Sets from.
183174
*
184-
* @param int $from when the rule should start to be active, in Unix epoch time
175+
* @param null|int $from when the rule should start to be active, in Unix epoch time
185176
*
186177
* @return self
187178
*/
@@ -195,7 +186,7 @@ public function setFrom($from)
195186
/**
196187
* Gets until.
197188
*
198-
* @return int
189+
* @return null|int
199190
*/
200191
public function getUntil()
201192
{
@@ -205,7 +196,7 @@ public function getUntil()
205196
/**
206197
* Sets until.
207198
*
208-
* @param int $until when the rule should stop to be active, in Unix epoch time
199+
* @param null|int $until when the rule should stop to be active, in Unix epoch time
209200
*
210201
* @return self
211202
*/

lib/Model/Search/TimeRange.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,7 @@ public static function getters()
145145
*/
146146
public function listInvalidProperties()
147147
{
148-
$invalidProperties = [];
149-
150-
if (!isset($this->container['from']) || null === $this->container['from']) {
151-
$invalidProperties[] = "'from' can't be null";
152-
}
153-
if (!isset($this->container['until']) || null === $this->container['until']) {
154-
$invalidProperties[] = "'until' can't be null";
155-
}
156-
157-
return $invalidProperties;
148+
return [];
158149
}
159150

160151
/**
@@ -171,7 +162,7 @@ public function valid()
171162
/**
172163
* Gets from.
173164
*
174-
* @return int
165+
* @return null|int
175166
*/
176167
public function getFrom()
177168
{
@@ -181,7 +172,7 @@ public function getFrom()
181172
/**
182173
* Sets from.
183174
*
184-
* @param int $from when the rule should start to be active, in Unix epoch time
175+
* @param null|int $from when the rule should start to be active, in Unix epoch time
185176
*
186177
* @return self
187178
*/
@@ -195,7 +186,7 @@ public function setFrom($from)
195186
/**
196187
* Gets until.
197188
*
198-
* @return int
189+
* @return null|int
199190
*/
200191
public function getUntil()
201192
{
@@ -205,7 +196,7 @@ public function getUntil()
205196
/**
206197
* Sets until.
207198
*
208-
* @param int $until when the rule should stop to be active, in Unix epoch time
199+
* @param null|int $until when the rule should stop to be active, in Unix epoch time
209200
*
210201
* @return self
211202
*/

0 commit comments

Comments
 (0)