Skip to content

Commit be2a9cb

Browse files
committed
Make tags on TagDependency public
1 parent 46eb239 commit be2a9cb

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/Dependency/TagDependency.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,13 @@
2828
*/
2929
class TagDependency extends Dependency
3030
{
31-
/** @var string[] */
32-
private readonly array $tags;
33-
34-
private readonly ?int $ttl;
35-
36-
/**
37-
* @param string[]|string $tags
38-
*/
39-
public function __construct(array|string $tags, ?int $ttl = null)
40-
{
31+
public function __construct(
32+
/**
33+
* @var string[]|string $tags
34+
*/
35+
public array|string $tags,
36+
public ?int $ttl = null
37+
) {
4138
$this->tags = Arr::wrap($tags);
4239

4340
if ($ttl !== null && $ttl < 1) {
@@ -46,8 +43,6 @@ public function __construct(array|string $tags, ?int $ttl = null)
4643
.' static `\CraftCms\DependencyAwareCache\Dependency\TagDependency::invalidate()` method.',
4744
);
4845
}
49-
50-
$this->ttl = $ttl;
5146
}
5247

5348
protected function generateData(Repository $cache): array

0 commit comments

Comments
 (0)