Skip to content

Commit

Permalink
always use only snake case params
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Oct 1, 2024
1 parent 21e7ba1 commit 3161d62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Paths/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ private function initParamsFromRequestPath(array $requestPathParts)
) {
self::produceErrorResponse(StatusCode::BAD_REQUEST, "path parameter expected to represent Year value but did not have type Integer or numeric String");
} else {
$DATA["YEAR"] = $requestPathParts[0];
$DATA["year"] = $requestPathParts[0];
}
} elseif ($numPathParts > 3) {
$description = "Expected at least one and at most three path parameters, instead found " . $numPathParts;
Expand All @@ -363,9 +363,9 @@ private function initParamsFromRequestPath(array $requestPathParts)
self::produceErrorResponse(StatusCode::BAD_REQUEST, $description);
} else {
if ($requestPathParts[0] === 'nation') {
$DATA['NATIONALCALENDAR'] = $requestPathParts[1];
$DATA['national_calendar'] = $requestPathParts[1];
} elseif ($requestPathParts[0] === 'diocese') {
$DATA['DIOCESANCALENDAR'] = $requestPathParts[1];
$DATA['diocesan_calendar'] = $requestPathParts[1];
}
}
if ($numPathParts === 3) {
Expand All @@ -382,7 +382,7 @@ private function initParamsFromRequestPath(array $requestPathParts)
) {
self::produceErrorResponse(StatusCode::BAD_REQUEST, "path parameter expected to represent Year value but did not have type Integer or numeric String");
} else {
$DATA["YEAR"] = $requestPathParts[2];
$DATA["year"] = $requestPathParts[2];
}
}
}
Expand Down

0 comments on commit 3161d62

Please sign in to comment.