Skip to content

Commit aa230f0

Browse files
More return type fixes (bis)
1 parent bf1d590 commit aa230f0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CacheWarmer/AbstractPhpFileCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function warmUp(string $cacheDir)
4949
spl_autoload_register([ClassExistenceResource::class, 'throwOnRequiredClass']);
5050
try {
5151
if (!$this->doWarmUp($cacheDir, $arrayAdapter)) {
52-
return;
52+
return [];
5353
}
5454
} finally {
5555
spl_autoload_unregister([ClassExistenceResource::class, 'throwOnRequiredClass']);

Tests/CacheWarmer/RouterCacheWarmerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testWarmUpWithWarmebleInterface()
2828
$routerCacheWarmer = new RouterCacheWarmer($containerMock);
2929

3030
$routerCacheWarmer->warmUp('/tmp');
31-
$routerMock->expects($this->any())->method('warmUp')->with('/tmp')->willReturn('');
31+
$routerMock->expects($this->any())->method('warmUp')->with('/tmp')->willReturn([]);
3232
$this->addToAssertionCount(1);
3333
}
3434

Translation/Translator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function warmUp(string $cacheDir)
100100
{
101101
// skip warmUp when translator doesn't use cache
102102
if (null === $this->options['cache_dir']) {
103-
return;
103+
return [];
104104
}
105105

106106
$localesToWarmUp = $this->enabledLocales ?: array_merge($this->getFallbackLocales(), [$this->getLocale()], $this->resourceLocales);

0 commit comments

Comments
 (0)