Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit b74134f

Browse files
minor #33770 Add types to constructors and private/final/internal methods (Batch III) (derrabus)
This PR was squashed before being merged into the 4.4 branch (closes #33770). Discussion ---------- Add types to constructors and private/final/internal methods (Batch III) | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | #32179, #33228 | License | MIT | Doc PR | N/A Followup to #33709, this time with: * Validator * VarDumper * Workflow * Yaml * all bridges * all bundles That should be the final batch. 😃 Commits ------- 6493902287 Add types to constructors and private/final/internal methods (Batch III)
2 parents e58c215 + d2b3c06 commit b74134f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Command/ServerLogCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
127127
return 0;
128128
}
129129

130-
private function getLogs($socket)
130+
private function getLogs($socket): iterable
131131
{
132132
$sockets = [(int) $socket => $socket];
133133
$write = [];
@@ -150,7 +150,7 @@ private function getLogs($socket)
150150
}
151151
}
152152

153-
private function displayLog(InputInterface $input, OutputInterface $output, $clientId, array $record)
153+
private function displayLog(InputInterface $input, OutputInterface $output, int $clientId, array $record)
154154
{
155155
if (isset($record['log_id'])) {
156156
$clientId = unpack('H*', $record['log_id'])[1];

DependencyInjection/WebServerExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function load(array $configs, ContainerBuilder $container)
4444
}
4545
}
4646

47-
private function getPublicDirectory(ContainerBuilder $container)
47+
private function getPublicDirectory(ContainerBuilder $container): string
4848
{
4949
$kernelProjectDir = $container->getParameter('kernel.project_dir');
5050
$publicDir = 'public';

WebServer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private function createServerProcess(WebServerConfig $config): Process
174174
return $process;
175175
}
176176

177-
private function getDefaultPidFile()
177+
private function getDefaultPidFile(): string
178178
{
179179
return ($this->pidFileDirectory ?? getcwd()).'/.web-server-pid';
180180
}

0 commit comments

Comments
 (0)