Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32f2ec9

Browse files
minor #49599 [HttpFoundation][HttpKernel] Add missing void PHPdoc return types (wouterj)
This PR was merged into the 6.3 branch. Discussion ---------- [HttpFoundation][HttpKernel] Add missing void PHPdoc return types | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no (void return types don't get a deprecation notice) | Tickets | Fix part of #47551 , ref #49439 | License | MIT | Doc PR | - Commits ------- 9bb72d7 [HttpFoundation][HttpKernel] Add missing void PHPdoc return types
2 parents 21c8789 + 9bb72d7 commit 32f2ec9

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
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

0 commit comments

Comments
 (0)