Skip to content

Commit

Permalink
best practices fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed Feb 21, 2024
1 parent e495e7f commit 0a251ef
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 0a251ef

Please sign in to comment.