From cb0e56d216bedc6b438898b883a0efa3420cf0ef Mon Sep 17 00:00:00 2001 From: Joshua Parker Date: Thu, 14 Aug 2025 19:33:06 -0700 Subject: [PATCH 1/3] Removed exception parameter. Signed-off-by: Joshua Parker --- Helpers/path.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Helpers/path.php b/Helpers/path.php index 908283f..94accde 100644 --- a/Helpers/path.php +++ b/Helpers/path.php @@ -18,7 +18,6 @@ * * @param string|null $path * @return string - * @throws TypeException */ function base_path(?string $path = null): string { @@ -30,7 +29,6 @@ function base_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function src_path(?string $path = null): string { @@ -42,7 +40,6 @@ function src_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function bootstrap_path(?string $path = null): string { @@ -54,7 +51,6 @@ function bootstrap_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function config_path(?string $path = null): string { @@ -66,7 +62,6 @@ function config_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function database_path(?string $path = null): string { @@ -78,7 +73,6 @@ function database_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function locale_path(?string $path = null): string { @@ -90,7 +84,6 @@ function locale_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function public_path(?string $path = null): string { @@ -102,7 +95,6 @@ function public_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function storage_path(?string $path = null): string { @@ -114,7 +106,6 @@ function storage_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function resource_path(?string $path = null): string { @@ -126,7 +117,6 @@ function resource_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function view_path(?string $path = null): string { @@ -138,7 +128,6 @@ function view_path(?string $path = null): string * * @param string|null $path * @return string - * @throws TypeException */ function vendor_path(?string $path = null): string { From cb3a3aba7d9de4340661cc32f78abfdb1170e243 Mon Sep 17 00:00:00 2001 From: Joshua Parker Date: Thu, 14 Aug 2025 19:34:47 -0700 Subject: [PATCH 2/3] Fixed truthy, bumped version, and updated singleton method. Signed-off-by: Joshua Parker --- Application.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Application.php b/Application.php index 60cfd9b..b458dee 100644 --- a/Application.php +++ b/Application.php @@ -68,7 +68,7 @@ final class Application extends Container { use InvokerAware; - public const APP_VERSION = '2.1.1'; + public const APP_VERSION = '2.1.2'; public const MIN_PHP_VERSION = '8.2'; @@ -250,9 +250,9 @@ public function version(): string * * @param string $key The value or object name * @param callable $value The closure that defines the object - * @return void + * @return Application */ - public function singleton(string $key, callable $value): void + public function singleton(string $key, callable $value): self { $this->proxy(name: $key, callableOrMethodStr: function ($c) use ($value) { static $object; @@ -263,6 +263,8 @@ public function singleton(string $key, callable $value): void return $object; }); + + return $this; } /** @@ -741,7 +743,7 @@ public function hasDebugModeEnabled(): bool /** @var ConfigContainer $config */ $config = $this->make(name: 'codefy.config'); - if ($config->getConfigKey(key: 'app.debug') === 'true') { + if ($config->getConfigKey(key: 'app.debug') === true) { return true; } From c5ba43e6aef5685858112e6867399742ed5cf67e Mon Sep 17 00:00:00 2001 From: Joshua Parker Date: Fri, 15 Aug 2025 07:24:19 -0700 Subject: [PATCH 3/3] Removed exception parameter. Signed-off-by: Joshua Parker --- Helpers/core.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Helpers/core.php b/Helpers/core.php index ace6fbd..965be11 100644 --- a/Helpers/core.php +++ b/Helpers/core.php @@ -217,7 +217,6 @@ function mail(string|array $to, string $subject, string $message, array $headers * @param string $name Name of the route. * @param array $params Data parameters. * @return string The url. - * @throws TypeException * @throws NamedRouteNotFoundException * @throws RouteParamFailedConstraintException */