Skip to content

Commit 495f073

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

File tree

26 files changed

+45
-20
lines changed

26 files changed

+45
-20
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/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/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

src/Symfony/Component/DependencyInjection/Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ public function setConfigurator($configurator)
812812
/**
813813
* Gets the configurator to call after the service is fully initialized.
814814
*
815-
* @return callable|array|null
815+
* @return string|array|null
816816
*/
817817
public function getConfigurator()
818818
{

src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(ContainerBuilder $container, string $env = null)
3636
*/
3737
public function load($resource, string $type = null)
3838
{
39-
$resource($this->container, $this->env);
39+
return $resource($this->container, $this->env);
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)