From 539fa62216f994be215381a76acc6dd7c46a1fe9 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Wed, 18 Dec 2024 12:25:22 +0100 Subject: [PATCH] wip --- src/Contracts/PayloadRepository.php | 5 ++++- src/Repositories/JsonPayloadRepository.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Contracts/PayloadRepository.php b/src/Contracts/PayloadRepository.php index 3ad024ee..1964bc1a 100644 --- a/src/Contracts/PayloadRepository.php +++ b/src/Contracts/PayloadRepository.php @@ -21,7 +21,10 @@ public function remove(string $key): self; public function add(string $key, $value): self; - public function get(string $key, $default = null): mixed; + /** + * @return mixed + */ + public function get(string $key, $default = null); public function merge(array ...$arrays): self; diff --git a/src/Repositories/JsonPayloadRepository.php b/src/Repositories/JsonPayloadRepository.php index ff98caa3..34d53f66 100644 --- a/src/Repositories/JsonPayloadRepository.php +++ b/src/Repositories/JsonPayloadRepository.php @@ -37,7 +37,10 @@ public function add(string $key, $value): self return $this; } - public function get(string $key, $default = null): mixed + /** + * @return mixed + */ + public function get(string $key, $default = null) { return $this->store[$key] ?? $default; }