Skip to content

Commit c6a20b4

Browse files
More return type fixes (bis)
1 parent 488a46f commit c6a20b4

File tree

34 files changed

+92
-64
lines changed

34 files changed

+92
-64
lines changed

src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(ManagerRegistry $registry)
3434
/**
3535
* This cache warmer is not optional, without proxies fatal error occurs!
3636
*
37-
* @return false
37+
* @return bool
3838
*/
3939
public function isOptional()
4040
{

src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidGeneratorTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
1616
use Symfony\Component\Uid\Factory\UuidFactory;
17-
use Symfony\Component\Uid\NilUuid;
1817
use Symfony\Component\Uid\Uuid;
1918
use Symfony\Component\Uid\UuidV4;
2019
use Symfony\Component\Uid\UuidV6;
@@ -35,7 +34,7 @@ public function testUuidCanBeGenerated()
3534

3635
public function testCustomUuidfactory()
3736
{
38-
$uuid = new NilUuid();
37+
$uuid = new UuidV4();
3938
$em = new EntityManager();
4039
$factory = $this->createMock(UuidFactory::class);
4140
$factory->expects($this->any())

src/Symfony/Bundle/FrameworkBundle/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']);

src/Symfony/Bundle/FrameworkBundle/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

src/Symfony/Bundle/FrameworkBundle/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);

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private function init($redis, string $namespace, int $defaultLifetime, ?Marshall
8484
*
8585
* @param array $options See self::$defaultConnectionOptions
8686
*
87-
* @return \Redis|\RedisCluster|RedisClusterProxy|RedisProxy|\Predis\ClientInterface According to the "class" option
87+
* @return \Redis|\RedisArray|\RedisCluster|RedisClusterProxy|RedisProxy|\Predis\ClientInterface According to the "class" option
8888
*
8989
* @throws InvalidArgumentException when the DSN is invalid
9090
*/

src/Symfony/Component/Console/Helper/HelperInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function setHelperSet(HelperSet $helperSet = null);
2626
/**
2727
* Gets the helper set associated with this helper.
2828
*
29-
* @return HelperSet A HelperSet instance
29+
* @return HelperSet|null
3030
*/
3131
public function getHelperSet();
3232

src/Symfony/Component/Console/Tests/Fixtures/FooLock2Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ protected function configure()
1414
$this->setName('foo:lock2');
1515
}
1616

17-
protected function execute(InputInterface $input, OutputInterface $output)
17+
protected function execute(InputInterface $input, OutputInterface $output): int
1818
{
1919
try {
2020
$this->lock();

src/Symfony/Component/Console/Tests/Fixtures/FooLockCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ protected function configure()
1414
$this->setName('foo:lock');
1515
}
1616

17-
protected function execute(InputInterface $input, OutputInterface $output)
17+
protected function execute(InputInterface $input, OutputInterface $output): int
1818
{
1919
if (!$this->lock()) {
2020
return 1;

src/Symfony/Component/Console/Tests/Fixtures/TestCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ protected function configure()
1616
;
1717
}
1818

19-
protected function execute(InputInterface $input, OutputInterface $output)
19+
protected function execute(InputInterface $input, OutputInterface $output): int
2020
{
2121
$output->writeln('execute called');
2222

0 commit comments

Comments
 (0)