Skip to content

Commit 5259d40

Browse files
committed
Fix tests
1 parent f63b428 commit 5259d40

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

CacheExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
final class CacheExtension extends AbstractExtension
1818
{
19-
public function getTokenParsers()
19+
public function getTokenParsers(): array
2020
{
2121
return [
2222
new CacheTokenParser(),

Tests/FunctionalTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,9 @@ public function __construct(CacheInterface $cache)
7878
$this->cache = $cache;
7979
}
8080

81-
public function load($class)
81+
public function load(string $class): ?object
8282
{
83-
if (CacheRuntime::class === $class) {
84-
return new CacheRuntime($this->cache);
85-
}
83+
return CacheRuntime::class === $class ? new CacheRuntime($this->cache) : null;
8684
}
8785
});
8886

Tests/IntegrationTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ protected function getRuntimeLoaders()
3030
{
3131
return [
3232
new class() implements RuntimeLoaderInterface {
33-
public function load($class)
33+
public function load(string $class): ?object
3434
{
35-
if (CacheRuntime::class === $class) {
36-
return new CacheRuntime(new ArrayAdapter());
37-
}
35+
return CacheRuntime::class === $class ? new CacheRuntime(new ArrayAdapter()) : null;
3836
}
3937
},
4038
];

0 commit comments

Comments
 (0)