Skip to content

Commit

Permalink
Merge pull request #25 from dfx413/master
Browse files Browse the repository at this point in the history
make doSaveDependingOnFiles nullable again
  • Loading branch information
Spamercz authored Dec 9, 2019
2 parents 5379f5b + 85011c4 commit 5888873
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ protected function doSave($id, $data, $lifeTime = 0): bool
* @param string[] $files
* @param int $lifeTime
*/
protected function doSaveDependingOnFiles(string $id, $data, array $files, int $lifeTime = 0): bool
protected function doSaveDependingOnFiles(string $id, $data, array $files, ?int $lifeTime = NULL): bool
{
$lifeTime = (int) $lifeTime;
$dp = [NCache::TAGS => ['doctrine'], NCache::FILES => $files];

if ($lifeTime > 0) {
$dp[NCache::EXPIRE] = time() + $lifeTime;
}
Expand Down
4 changes: 2 additions & 2 deletions src/DI/ClassAliasMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
declare(strict_types = 1);

return [
\Kdyby\DoctrineCache\NotImplementedException::class => \Kdyby\DoctrineCache\Exception\NotImplementedException::class,
\Kdyby\DoctrineCache\Exception::class => \Kdyby\DoctrineCache\Exception\Exception::class,
\Kdyby\DoctrineCache\NotImplementedException::class => \Kdyby\DoctrineCache\Exception\NotImplementedException::class,
\Kdyby\DoctrineCache\Exception::class => \Kdyby\DoctrineCache\Exception\Exception::class,
];

0 comments on commit 5888873

Please sign in to comment.