From 3161d62b7acf559b6f4b7da32bb7ad75892ddb72 Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Tue, 1 Oct 2024 02:47:20 +0200 Subject: [PATCH] always use only snake case params --- src/Paths/Calendar.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Paths/Calendar.php b/src/Paths/Calendar.php index 5cf27429..76dbbb5e 100644 --- a/src/Paths/Calendar.php +++ b/src/Paths/Calendar.php @@ -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; @@ -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) { @@ -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]; } } }