diff --git a/CHANGELOG.md b/CHANGELOG.md index e6d3336..caf1254 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Request info in response. +### Changed +- **BREAKING**: Snake case `runtimeInMilliseconds`. + ## [0.5.1] - 2023-03-10 ### Added - Uniqueness to custom "about" information. diff --git a/README.md b/README.md index 4a6366f..2839819 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ The endpoint will return data in JSON. "slug": "database", "group": "core", "description": "Check all database connections.", - "runtimeInMilliseconds": 10, + "runtime_in_milliseconds": 10, "result": { "value": 1, "message": "Connected to all databases.", diff --git a/src/Repository.php b/src/Repository.php index 0957700..54c0829 100644 --- a/src/Repository.php +++ b/src/Repository.php @@ -90,7 +90,7 @@ private function checkToArray(Check $check): array 'group' => $check->group ?? 'other', 'description' => $check->description, 'result' => $check->run()->toArray(), - 'runtimeInMilliseconds' => $start->diffInMilliseconds(), + 'runtime_in_milliseconds' => $start->diffInMilliseconds(), ]; } diff --git a/tests/RepositoryTest.php b/tests/RepositoryTest.php index 0b1ac17..7a2edc1 100644 --- a/tests/RepositoryTest.php +++ b/tests/RepositoryTest.php @@ -51,7 +51,7 @@ public function test_invoke_returns_correct_default_information() 'slug' => 'test-check', 'group' => 'other', 'description' => 'A test check', - 'runtimeInMilliseconds' => 100, + 'runtime_in_milliseconds' => 100, 'result' => [ 'value' => null, 'message' => 'Looking good.',