Skip to content

Commit ce7d25d

Browse files
committed
simplify handleRequestParams method
1 parent 942cd1a commit ce7d25d

File tree

2 files changed

+142
-85
lines changed

2 files changed

+142
-85
lines changed

src/Params/RegionalDataParams.php

+14
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,20 @@ private function checkWiderRegionCalendarConditions(object $data)
307307
return $data->key;
308308
}
309309

310+
/**
311+
* Validate the payload for the RegionalDataParams class.
312+
*
313+
* This method checks whether the payload has the required properties
314+
* for the given category of Regional Calendar data.
315+
*
316+
* If the payload is invalid, the method will produce an error response
317+
* with a 400 status code.
318+
*
319+
* @param object $payload
320+
* The payload to validate.
321+
* @return bool
322+
* Whether the payload is valid or not.
323+
*/
310324
private function validatePayload(object $payload): bool
311325
{
312326
switch ($this->category) {

0 commit comments

Comments
 (0)