Skip to content

Commit

Permalink
[WebServerBundle] Add types to constructors and private/final/interna…
Browse files Browse the repository at this point in the history
…l methods.
  • Loading branch information
derrabus committed Sep 30, 2019
1 parent b6c461b commit e4cfa7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -125,7 +125,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

private function getLogs($socket)
private function getLogs($socket): iterable
{
$sockets = [(int) $socket => $socket];
$write = [];
Expand All @@ -148,7 +148,7 @@ private function getLogs($socket)
}
}

private function displayLog(InputInterface $input, OutputInterface $output, $clientId, array $record)
private function displayLog(InputInterface $input, OutputInterface $output, int $clientId, array $record)
{
if (isset($record['log_id'])) {
$clientId = unpack('H*', $record['log_id'])[1];
Expand Down
Expand Up @@ -46,7 +46,7 @@ public function load(array $configs, ContainerBuilder $container)
@trigger_error('Using the WebserverBundle is deprecated since Symfony 4.4, the new symfony local server has more feature, you should use it instead.', E_USER_DEPRECATED);
}

private function getPublicDirectory(ContainerBuilder $container)
private function getPublicDirectory(ContainerBuilder $container): string
{
$kernelProjectDir = $container->getParameter('kernel.project_dir');
$publicDir = 'public';
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/WebServerBundle/WebServer.php
Expand Up @@ -174,7 +174,7 @@ private function createServerProcess(WebServerConfig $config): Process
return $process;
}

private function getDefaultPidFile()
private function getDefaultPidFile(): string
{
return ($this->pidFileDirectory ?? getcwd()).'/.web-server-pid';
}
Expand Down

0 comments on commit e4cfa7e

Please sign in to comment.