Applied rector with PHP8.1 migration rules

This commit is contained in:
Jan Böhmer 2023-06-11 14:15:46 +02:00
parent dc6a67c2f0
commit 7ee01d9a05
303 changed files with 1228 additions and 3465 deletions

View file

@ -27,19 +27,18 @@ use Symfony\Contracts\Cache\TagAwareCacheInterface;
final class SidebarTreeUpdater
{
private const CACHE_KEY = 'sidebar_tree_updated';
private const TTL = 60 * 60 * 24; // 24 hours
private const TTL = 60 * 60 * 24;
private CacheInterface $cache;
public function __construct(TagAwareCacheInterface $treeCache)
public function __construct(
// 24 hours
private readonly TagAwareCacheInterface $cache
)
{
$this->cache = $treeCache;
}
/**
* Returns the time when the sidebar tree was updated the last time.
* The frontend uses this information to reload the sidebar tree.
* @return \DateTimeInterface
*/
public function getLastTreeUpdate(): \DateTimeInterface
{