8000 minor #53719 [HttpKernel] Document Kernel's array return types (derra… · symfony/symfony@ae9ebad · GitHub
[go: up one dir, main page]

Skip to content

Commit ae9ebad

Browse files
minor #53719 [HttpKernel] Document Kernel's array return types (derrabus)
This PR was merged into the 7.1 branch. Discussion ---------- [HttpKernel] Document Kernel's array return types | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT The `Kernel` methods `getAnnotatedClassesToCompile()` and `getKernelParameters()` are meant to be overridden downstream. These additional annotations help static analyzers determine whether an overridden implementation is correct. Commits ------- 266af52 [HttpKernel] Document Kernel's array return types
2 parents 3f91ca6 + 266af52 commit ae9ebad

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ abstract class Extension extends BaseExtension
2424

2525
/**
2626
* Gets the annotated classes to cache.
27+
*
28+
* @return string[]
2729
*/
2830
public function getAnnotatedClassesToCompile(): array
2931
{
@@ -33,7 +35,7 @@ public function getAnnotatedClassesToCompile(): array
3335
/**
3436
* Adds annotated classes to the class cache.
3537
*
36-
* @param array $annotatedClasses An array of class patterns
38+
* @param string[] $annotatedClasses An array of class patterns
3739
*/
3840
public function addAnnotatedClassesToCompile(array $annotatedClasses): void
3941
{

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ public function getCharset(): string
314314

315315
/**
316316
* Gets the patterns defining the classes to parse and cache for annotations.
317+
*
318+
* @return string[]
317319
*/
318320
public function getAnnotatedClassesToCompile(): array
319321
{
@@ -534,6 +536,8 @@ protected function initializeContainer(): void
534536

535537
/**
536538
* Returns the kernel parameters.
539+
*
540+
* @return array<string, array|bool|string|int|float|\UnitEnum|null>
537541
*/
538542
protected function getKernelParameters(): array
539543
{

0 commit comments

Comments
 (0)
0