mirror of
https://github.com/symfony/http-kernel.git
synced 2026-03-24 01:12:09 +01:00
Enforce return types on all components
This commit is contained in:
@@ -31,27 +31,19 @@ abstract class Bundle implements BundleInterface
|
||||
|
||||
private string $namespace;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
public function boot(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function shutdown()
|
||||
public function shutdown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* This method can be overridden to register compilation passes,
|
||||
* other extensions, ...
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function build(ContainerBuilder $container)
|
||||
public function build(ContainerBuilder $container): void
|
||||
{
|
||||
}
|
||||
|
||||
@@ -118,10 +110,7 @@ abstract class Bundle implements BundleInterface
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function registerCommands(Application $application)
|
||||
public function registerCommands(Application $application): void
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -24,26 +24,20 @@ interface BundleInterface
|
||||
{
|
||||
/**
|
||||
* Boots the Bundle.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot();
|
||||
public function boot(): void;
|
||||
|
||||
/**
|
||||
* Shutdowns the Bundle.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function shutdown();
|
||||
public function shutdown(): void;
|
||||
|
||||
/**
|
||||
* Builds the bundle.
|
||||
*
|
||||
* It is only ever called once when the cache is empty.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function build(ContainerBuilder $container);
|
||||
public function build(ContainerBuilder $container): void;
|
||||
|
||||
/**
|
||||
* Returns the container extension that should be implicitly loaded.
|
||||
|
||||
@@ -107,10 +107,7 @@ abstract class DataCollector implements DataCollectorInterface
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function reset()
|
||||
public function reset(): void
|
||||
{
|
||||
$this->data = [];
|
||||
}
|
||||
|
||||
@@ -24,15 +24,11 @@ interface DataCollectorInterface extends ResetInterface
|
||||
{
|
||||
/**
|
||||
* Collects data for the given Request and Response.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function collect(Request $request, Response $response, ?\Throwable $exception = null);
|
||||
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void;
|
||||
|
||||
/**
|
||||
* Returns the name of the collector.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName();
|
||||
public function getName(): string;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@ interface LateDataCollectorInterface
|
||||
{
|
||||
/**
|
||||
* Collects data as late as possible.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function lateCollect();
|
||||
public function lateCollect(): void;
|
||||
}
|
||||
|
||||
@@ -33,26 +33,20 @@ interface KernelInterface extends HttpKernelInterface
|
||||
|
||||
/**
|
||||
* Loads the container configuration.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerContainerConfiguration(LoaderInterface $loader);
|
||||
public function registerContainerConfiguration(LoaderInterface $loader): void;
|
||||
|
||||
/**
|
||||
* Boots the current kernel.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot();
|
||||
public function boot(): void;
|
||||
|
||||
/**
|
||||
* Shutdowns the kernel.
|
||||
*
|
||||
* This method is mainly useful when doing functional testing.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function shutdown();
|
||||
public function shutdown(): void;
|
||||
|
||||
/**
|
||||
* Gets the registered bundle instances.
|
||||
|
||||
Reference in New Issue
Block a user