8000 [HttpFoundation][HttpKernel] Add missing void PHPdoc return types · symfony/symfony@9bb72d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9bb72d7

Browse files
wouterjnicolas-grekas
authored andcommitted
[HttpFoundation][HttpKernel] Add missing void PHPdoc return types
1 parent 21c8789 commit 9bb72d7

21 files changed

+355
-7
lines changed

.github/expected-missing-return-types.diff

Lines changed: 282 additions & 2 deletions
Large diffs are not rendered by default.

src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ public function registerBundles(): iterable
128128
}
129129
}
130130

131+
/**
132+
* @return void
133+
*/
131134
public function registerContainerConfiguration(LoaderInterface $loader)
132135
{
133136
$loader->load(function (ContainerBuilder $container) use ($loader) {

src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function getLogDir(): string
7575
A3E2 return sys_get_temp_dir().'/'.$this->varDir.'/'.$this->testCase.'/logs';
7676
}
7777

78-
public function registerContainerConfiguration(LoaderInterface $loader)
78+
public function registerContainerConfiguration(LoaderInterface $loader): void
7979
{
8080
foreach ($this->rootConfig as $config) {
8181
$loader->load($config);

src/Symfony/Bundle/TwigBundle/Tests/Functional/EmptyAppTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function registerBundles(): iterable
5858
return [new TwigBundle()];
5959
}
6060

61-
public function registerContainerConfiguration(LoaderInterface $loader)
61+
public function registerContainerConfiguration(LoaderInterface $loader): void
6262
{
6363
$loader->load(static function (ContainerBuilder $container) {
6464
$container->register('error_renderer.html', HtmlErrorRenderer::class);

src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function registerBundles(): iterable
5959
return [new FrameworkBundle(), new TwigBundle()];
6060
}
6161

62-
public function registerContainerConfiguration(LoaderInterface $loader)
62+
public function registerContainerConfiguration(LoaderInterface $loader): void
6363
{
6464
$loader->load(function (ContainerBuilder $container) {
6565
$container

src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public function get(string $name, mixed $default = null): mixed;
3232

3333
/**
3434
* Sets an attribute.
35+
*
36+
* @return void
3537
*/
3638
public function set(string $name, mixed $value);
3739

@@ -42,6 +44,9 @@ public function set(string $name, mixed $value);
4244
*/
4345
public function all(): array;
4446

47+
/**
48+
* @return void
49+
*/
4550
public function replace(array $attributes);
4651

4752
/**

src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ interface FlashBagInterface extends SessionBagInterface
2222
{
2323
/**
2424
* Adds a flash message for the given type.
25+
*
26+
* @return void
2527
*/
2628
public function add(string $type, mixed $message);
2729

2830
/**
2931
* Registers one or more messages for a given type.
32+
*
33+
* @return void
3034
*/
3135
public function set(string $type, string|array $messages);
3236

@@ -57,6 +61,8 @@ public function all(): array;
5761

5862
/**
5963
* Sets all flash messages.
64+
*
65+
* @return void
6066
*/
6167
public function setAll(array $messages);
6268

src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public function getName(): string;
2525

2626
/**
2727
* Initializes the Bag.
28+
*
29+
* @return void
2830
*/
2931
public function initialize(array &$array);
3032

src/Symfony/Component/HttpFoundation/Session/SessionInterface.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public function getId(): string;
3434

3535
/**
3636
* Sets the session ID.
37+
*
38+
* @return void
3739
*/
3840
public function setId(string $id);
3941

@@ -44,6 +46,8 @@ public function getName(): string;
4446

4547
/**
4648
* Sets the session name.
49+
*
50+
* @return void
4751
*/
4852
public function setName(string $name);
4953

@@ -78,6 +82,8 @@ public function migrate(bool $destroy = false, int $lifetime = null): bool;
7882
* This method is generally not required for real sessions as
7983
* the session will be automatically saved at the end of
8084
* code execution.
85+
*
86+
* @return void
8187
*/
8288
public function save();
8389

@@ -93,6 +99,8 @@ public function get(string $name, mixed $default = null): mixed;
9399

94100
/**
95101
* Sets an attribute.
102+
*
103+
* @return void
96104
*/
97105
public function set(string $name, mixed $value);
98106

@@ -103,6 +111,8 @@ public function all(): array;
103111

104112
/**
105113
* Sets attributes.
114+
*
115+
* @return void
106116
*/
107117
public function replace(array $attributes);
108118

@@ -115,6 +125,8 @@ public function remove(string $name): mixed;
115125

116126
/**
117127
* Clears all attributes.
128+
*
129+
* @return void
118130
*/
119131
public function clear();
120132

@@ -125,6 +137,8 @@ public function isStarted(): bool;
125137

126138
/**
127139
* Registers a SessionBagInterface with the session.
140+
*
141+
* @return void
128142
*/
129143
public function registerBag(SessionBagInterface $bag);
130144

src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public function getId(): string;
4040

4141
/**
4242
* Sets the session ID.
43+
*
44+
* @return void
4345
*/
4446
public function setId(string $id);
4547

@@ -50,6 +52,8 @@ public function getName(): string;
5052

5153
/**
5254
* Sets the session name.
55+
*
56+
* @return void
5357
*/
5458
public function setName(string $name);
5559

@@ -90,13 +94,17 @@ public function regenerate(bool $destroy = false, int $lifetime = null): bool;
9094
* a real PHP session would interfere with testing, in which case
9195
* it should actually persist the session data if required.
9296
*
97+
* @return void
98+
*
9399
* @throws \RuntimeException if the session is saved without being started, or if the session
94100
* is already closed
95101
*/
96102
public function save();
97103

98104
/**
99105
* Clear all session data in memory.
106+
*
107+
* @return void
100108
*/
101109
public function clear();
102110

@@ -109,6 +117,8 @@ public function getBag(string $name): SessionBagInterface;
109117

110118
/**
111119
* Registers a SessionBagInterface for use.
120+
*
121+
* @return void
112122
*/
113123
public function registerBag(SessionBagInterface $bag);
114124

src/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ interface CacheClearerInterface
2020
{
2121
/**
2222
* Clears any caches necessary.
23+
*
24+
* @return void
2325
*/
2426
public function clear(string $cacheDir);
2527
}

src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ interface ResponseCacheStrategyInterface
2727
{
2828
/**
2929
* Adds a Response.
30+
*
31+
* @return void
3032
*/
3133
public function add(Response $response);
3234

3335
/**
3436
* Updates the Response HTTP headers based on the embedded Responses.
37+
*
38+
* @return void
3539
*/
3640
public function update(Response $response);
3741
}

src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public function write(Request $request, Response $response): string;
4141

4242
/**
4343
* Invalidates all cache entries that match the request.
44+
*
45+
* @return void
4446
*/
4547
public function invalidate(Request $request);
4648

@@ -74,6 +76,8 @@ public function purge(string $url): bool;
7476

7577
/**
7678
* Cleanups storage.
79+
*
80+
* @return void
7781
*/
7882
public function cleanup();
7983
}

src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@ public function hasSurrogateCapability(Request $request): bool;
3333

3434
/**
3535
* Adds Surrogate-capability to the given Request.
36+
*
37+
* @return void
3638
*/
3739
public function addSurrogateCapability(Request $request);
3840

3941
/**
4042
* Adds HTTP headers to specify that the Response needs to be parsed for Surrogate.
4143
*
4244
* This method only adds an Surrogate HTTP header if the Response has some Surrogate tags.
45+
*
46+
* @return void
4347
*/
4448
public function addSurrogateControl(Response $response);
4549

src/Symfony/Component/HttpKernel/KernelInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,24 @@ public function registerBundles(): iterable;
3333

3434
/**
3535
* Loads the container configuration.
36+
*
37+
* @return void
3638
*/
3739
public function registerContainerConfiguration(LoaderInterface $loader);
3840

3941
/**
4042
* Boots the current kernel.
43+
*
44+
* @return void
4145
*/
4246
public function boot();
4347

4448
/**
4549
* Shutdowns the kernel.
4650
*
4751
* This method is mainly useful when doing functional testing.
52+
*
53+
* @return void
4854
*/
4955
public function shutdown();
5056

src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public function countErrors(Request $request = null);
4444

4545
/**
4646
* Removes all log records.
47+
*
48+
* @return void
4749
*/
4850
public function clear();
4951
}

src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public function write(Profile $profile): bool;
4949

5050
/**
5151
* Purges all data from the database.
52+
*
53+
* @return void
5254
*/
5355
public function purge();
5456
}

src/Symfony/Component/HttpKernel/RebootableInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ interface RebootableInterface
2525
* while building the container. Use the %kernel.build_dir% parameter instead.
2626
*
2727
* @param string|null $warmupDir pass null to reboot in the regular build directory
28+
*
29+
* @return void
2830
*/
2931
public function reboot(?string $warmupDir);
3032
}

src/Symfony/Component/HttpKernel/TerminableInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ interface TerminableInterface
2727
* Terminates a request/response cycle.
2828
*
2929
* Should be called after sending the response and before shutting down the kernel.
30+
*
31+
* @return void
3032
*/
3133
public function terminate(Request $request, Response $response);
3234
}

src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function getBundles(): array
9090
return [];
9191
}
9292

93-
public function registerContainerConfiguration(LoaderInterface $loader)
93+
public function registerContainerConfiguration(LoaderInterface $loader): void
9494
{
9595
}
9696
}

src/Symfony/Component/HttpKernel/Tests/Logger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function getLogs($level = false): array
2727
return false === $level ? $this->logs : $this->logs[$level];
2828
}
2929

30-
public function clear()
30+
public function clear(): void
3131
{
3232
$this->logs = [
3333
'emergency' => [],

0 commit comments

Comments
 (0)
0