Skip to content

Commit ec29311

Browse files
committed
added type hints
1 parent b24390d commit ec29311

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Bridges/CacheDI/CacheExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class CacheExtension extends Nette\DI\CompilerExtension
2121
private $tempDir;
2222

2323

24-
public function __construct($tempDir)
24+
public function __construct(string $tempDir)
2525
{
2626
$this->tempDir = $tempDir;
2727
}

src/Caching/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Cache
4343
private $namespace;
4444

4545

46-
public function __construct(IStorage $storage, $namespace = null)
46+
public function __construct(IStorage $storage, string $namespace = null)
4747
{
4848
$this->storage = $storage;
4949
$this->namespace = $namespace . self::NAMESPACE_SEPARATOR;

src/Caching/Storages/FileStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class FileStorage implements Nette\Caching\IStorage
6363
private $locks;
6464

6565

66-
public function __construct($dir, IJournal $journal = null)
66+
public function __construct(string $dir, IJournal $journal = null)
6767
{
6868
if (!is_dir($dir)) {
6969
throw new Nette\DirectoryNotFoundException("Directory '$dir' not found.");

src/Caching/Storages/SQLiteStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SQLiteStorage implements Nette\Caching\IStorage, Nette\Caching\IBulkReader
2424
private $pdo;
2525

2626

27-
public function __construct($path)
27+
public function __construct(string $path)
2828
{
2929
if ($path !== ':memory:' && !is_file($path)) {
3030
touch($path); // ensures ordinary file permissions

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Tester\Helpers::purge(TEMP_DIR);
2222

2323

24-
function test(\Closure $function)
24+
function test(\Closure $function): void
2525
{
2626
$function();
2727
}

0 commit comments

Comments
 (0)