From 0a251ef0af62885cf8c159efdf9e0bdba7688e74 Mon Sep 17 00:00:00 2001 From: Julien Turbide Date: Wed, 21 Feb 2024 01:16:31 -0500 Subject: [PATCH] best practices fixes --- src/Tag.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Tag.php b/src/Tag.php index 300f8580..b06c835b 100644 --- a/src/Tag.php +++ b/src/Tag.php @@ -29,7 +29,7 @@ class Tag extends PhalconTag protected static ?Manager $assetsService = null; - public static function getAssets(?array $params = null): Manager + public static function getAssets(?array $params = null): ?Manager { self::$assetsService ??= self::getDI()->get('assets', $params); return self::$assetsService; @@ -38,14 +38,16 @@ public static function getAssets(?array $params = null): Manager /** * Returns an Assets service from the default DI */ - public static function getAssetsService(): Manager + public static function getAssetsService(): ?Manager { self::$assetsService ??= self::getDI()->getService('assets'); return self::$assetsService; } - - public static function setAssetsService(Manager $assets): void + /** + * Set the Asset Service for Tag + */ + public static function setAssetsService(?Manager $assets): void { self::$assetsService = $assets; }