Skip to content

Commit b24390d

Browse files
committed
type fixes
1 parent e2f2ee6 commit b24390d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Caching/OutputHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class OutputHelper
2020
use Nette\SmartObject;
2121

2222
/** @var array */
23-
public $dependencies;
23+
public $dependencies = [];
2424

25-
/** @var Cache */
25+
/** @var Cache|null */
2626
private $cache;
2727

2828
/** @var string */
@@ -40,12 +40,12 @@ public function __construct(Cache $cache, $key)
4040
/**
4141
* Stops and saves the cache.
4242
*/
43-
public function end(array $dependencies = null): void
43+
public function end(array $dependencies = []): void
4444
{
4545
if ($this->cache === null) {
4646
throw new Nette\InvalidStateException('Output cache has already been saved.');
4747
}
48-
$this->cache->save($this->key, ob_get_flush(), (array) $dependencies + (array) $this->dependencies);
48+
$this->cache->save($this->key, ob_get_flush(), $dependencies + $this->dependencies);
4949
$this->cache = null;
5050
}
5151
}

0 commit comments

Comments
 (0)