Skip to content

Commit 51cc3b3

Browse files
minor #57814 [Cache][Config][Console][DependencyInjection][FrameworkBundle] Remove unused code and useless casts (alexandre-daubois)
This PR was merged into the 7.2 branch. Discussion ---------- [Cache][Config][Console][DependencyInjection][FrameworkBundle] Remove unused code and useless casts | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Commits ------- 24d7bc4a12 [Cache][Config][Console][DependencyInjection][FrameworkBundle] Remove dead code and useless casts
2 parents 2353b5c + 6ae2ba1 commit 51cc3b3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CacheWarmer/AbstractPhpFileCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function warmUp(string $cacheDir, ?string $buildDir = null): array
5858
*/
5959
protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array $values): array
6060
{
61-
return (array) $phpArrayAdapter->warmUp($values);
61+
return $phpArrayAdapter->warmUp($values);
6262
}
6363

6464
/**

Console/Descriptor/XmlDescriptor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function describeContainerService(object $service, array $options = []
6464

6565
protected function describeContainerServices(ContainerBuilder $container, array $options = []): void
6666
{
67-
$this->writeDocument($this->getContainerServicesDocument($container, $options['tag'] ?? null, isset($options['show_hidden']) && $options['show_hidden'], isset($options['show_arguments']) && $options['show_arguments'], $options['filter'] ?? null, $options['id'] ?? null));
67+
$this->writeDocument($this->getContainerServicesDocument($container, $options['tag'] ?? null, isset($options['show_hidden']) && $options['show_hidden'], isset($options['show_arguments']) && $options['show_arguments'], $options['filter'] ?? null));
6868
}
6969

7070
protected function describeContainerDefinition(Definition $definition, array $options = [], ?ContainerBuilder $container = null): void
@@ -288,7 +288,7 @@ private function getContainerServiceDocument(object $service, string $id, ?Conta
288288
return $dom;
289289
}
290290

291-
private function getContainerServicesDocument(ContainerBuilder $container, ?string $tag = null, bool $showHidden = false, bool $showArguments = false, ?callable $filter = null, ?string $id = null): \DOMDocument
291+
private function getContainerServicesDocument(ContainerBuilder $container, ?string $tag = null, bool $showHidden = false, bool $showArguments = false, ?callable $filter = null): \DOMDocument
292292
{
293293
$dom = new \DOMDocument('1.0', 'UTF-8');
294294
$dom->appendChild($containerXML = $dom->createElement('container'));

DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ public function load(array $configs, ContainerBuilder $container): void
498498
if (!$messengerEnabled) {
499499
throw new LogicException('Scheduler support cannot be enabled as the Messenger component is not '.(interface_exists(MessageBusInterface::class) ? 'enabled.' : 'installed. Try running "composer require symfony/messenger".'));
500500
}
501-
$this->registerSchedulerConfiguration($config['scheduler'], $container, $loader);
501+
$this->registerSchedulerConfiguration($container, $loader);
502502
} else {
503503
$container->removeDefinition('cache.scheduler');
504504
$container->removeDefinition('console.command.scheduler_debug');
@@ -570,7 +570,7 @@ public function load(array $configs, ContainerBuilder $container): void
570570
}
571571

572572
if ($this->readConfigEnabled('remote-event', $container, $config['remote-event'])) {
573-
$this->registerRemoteEventConfiguration($config['remote-event'], $container, $loader);
573+
$this->registerRemoteEventConfiguration($loader);
574574
}
575575

576576
if ($this->readConfigEnabled('html_sanitizer', $container, $config['html_sanitizer'])) {
@@ -2073,7 +2073,7 @@ private function registerSemaphoreConfiguration(array $config, ContainerBuilder
20732073
}
20742074
}
20752075

2076-
private function registerSchedulerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader): void
2076+
private function registerSchedulerConfiguration(ContainerBuilder $container, PhpFileLoader $loader): void
20772077
{
20782078
if (!class_exists(SchedulerTransportFactory::class)) {
20792079
throw new LogicException('Scheduler support cannot be enabled as the Scheduler component is not installed. Try running "composer require symfony/scheduler".');
@@ -2940,7 +2940,7 @@ private function registerWebhookConfiguration(array $config, ContainerBuilder $c
29402940
$controller->replaceArgument(1, new Reference($config['message_bus']));
29412941
}
29422942

2943-
private function registerRemoteEventConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader): void
2943+
private function registerRemoteEventConfiguration(PhpFileLoader $loader): void
29442944
{
29452945
if (!class_exists(RemoteEvent::class)) {
29462946
throw new LogicException('RemoteEvent support cannot be enabled as the component is not installed. Try running "composer require symfony/remote-event".');

0 commit comments

Comments
 (0)