Skip to content

Commit ccdea7e

Browse files
committed
cs
1 parent c169fcc commit ccdea7e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/Caching/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ final public function getStorage(): Storage
9595
*/
9696
final public function getNamespace(): string
9797
{
98-
return (string) substr($this->namespace, 0, -1);
98+
return substr($this->namespace, 0, -1);
9999
}
100100

101101

tests/Storages/FileStorage.deadlock.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ try {
2424
} catch (Throwable $e) {
2525
}
2626

27-
Assert::noError(function () use ($cache) {
28-
$cache->load('key', function () {});
29-
});
27+
Assert::noError(
28+
fn() => $cache->load('key', function () {}),
29+
);

tests/Storages/FileStorage.exceptions.phpt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ use Tester\Assert;
1414
require __DIR__ . '/../bootstrap.php';
1515

1616

17-
Assert::exception(function () {
18-
new FileStorage(getTempDir() . '/missing');
19-
}, Nette\DirectoryNotFoundException::class, "Directory '%a%' not found.");
17+
Assert::exception(
18+
fn() => new FileStorage(getTempDir() . '/missing'),
19+
Nette\DirectoryNotFoundException::class,
20+
"Directory '%a%' not found.",
21+
);
2022

2123

2224
Assert::exception(function () {

0 commit comments

Comments
 (0)