Skip to content

Commit

Permalink
Add types
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Oct 23, 2024
1 parent b76974b commit f27a74d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
6 changes: 3 additions & 3 deletions src/TwigAssetsCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class TwigAssetsCache
*
* @var string Path
*/
protected $directory;
protected string $directory = '';

/**
* @var int File mode
*/
protected $chmod = -1;
protected int $chmod = -1;

/**
* Create new instance.
Expand Down Expand Up @@ -60,7 +60,7 @@ public function clearCache(): bool
*
* @return void
*/
private function removeDirectory(string $path)
private function removeDirectory(string $path): void
{
$iterator = new DirectoryIterator($path);
foreach ($iterator as $fileInfo) {
Expand Down
28 changes: 5 additions & 23 deletions src/TwigAssetsEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,18 @@
*/
final class TwigAssetsEngine
{
/**
* @var LoaderInterface
*/
private $loader;
private LoaderInterface $loader;

/**
* Cache.
*
* @var AbstractAdapter|ArrayAdapter
*/
private $cache;
private AbstractAdapter|ArrayAdapter $cache;

/**
* @var CssMinifier
*/
private $cssMinifier;
private CssMinifier $cssMinifier;

/**
* Cache.
*
* @var PublicAssetsCache AssetCache
*/
private $publicCache;
private PublicAssetsCache $publicCache;

/**
* Default options.
*
* @var array
*/
private $options;
private array $options = [];

/**
* Create new instance.
Expand Down

0 comments on commit f27a74d

Please sign in to comment.