Skip to content

Commit 1c1dce1

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Serializer] cs fix Cleanup more `@return` annotations [Form] Fix phpdoc on FormBuilderInterface
2 parents e3ecbc0 + be4ba59 commit 1c1dce1

File tree

54 files changed

+46
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+46
-355
lines changed

Diff for: AbstractRendererEngine.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function getResourceForBlockNameHierarchy(FormView $view, array $blockNam
108108
/**
109109
* {@inheritdoc}
110110
*/
111-
public function getResourceHierarchyLevel(FormView $view, array $blockNameHierarchy, int $hierarchyLevel): int|bool
111+
public function getResourceHierarchyLevel(FormView $view, array $blockNameHierarchy, int $hierarchyLevel): int|false
112112
{
113113
$cacheKey = $view->vars[self::CACHE_KEY_VAR];
114114
$blockName = $blockNameHierarchy[$hierarchyLevel];
@@ -132,7 +132,7 @@ public function getResourceHierarchyLevel(FormView $view, array $blockNameHierar
132132
*
133133
* @see getResourceForBlock()
134134
*
135-
* @return bool True if the resource could be loaded, false otherwise
135+
* @return bool
136136
*/
137137
abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName);
138138

Diff for: Button.php

-22
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ public function __construct(FormConfigInterface $config)
3737

3838
/**
3939
* Unsupported method.
40-
*
41-
* @return bool Always returns false
4240
*/
4341
public function offsetExists(mixed $offset): bool
4442
{
@@ -129,8 +127,6 @@ public function get(string $name): FormInterface
129127

130128
/**
131129
* Unsupported method.
132-
*
133-
* @return bool Always returns false
134130
*/
135131
public function has(string $name): bool
136132
{
@@ -204,8 +200,6 @@ public function getViewData(): mixed
204200

205201
/**
206202
* Unsupported method.
207-
*
208-
* @return array Always returns an empty array
209203
*/
210204
public function getExtraData(): array
211205
{
@@ -222,8 +216,6 @@ public function getConfig(): FormConfigInterface
222216

223217
/**
224218
* Returns whether the button is submitted.
225-
*
226-
* @return bool true if the button was submitted
227219
*/
228220
public function isSubmitted(): bool
229221
{
@@ -232,8 +224,6 @@ public function isSubmitted(): bool
232224

233225
/**
234226
* Returns the name by which the button is identified in forms.
235-
*
236-
* @return string The name of the button
237227
*/
238228
public function getName(): string
239229
{
@@ -260,8 +250,6 @@ public function addError(FormError $error): static
260250

261251
/**
262252
* Unsupported method.
263-
*
264-
* @return bool Always returns true
265253
*/
266254
public function isValid(): bool
267255
{
@@ -270,8 +258,6 @@ public function isValid(): bool
270258

271259
/**
272260
* Unsupported method.
273-
*
274-
* @return bool Always returns false
275261
*/
276262
public function isRequired(): bool
277263
{
@@ -292,8 +278,6 @@ public function isDisabled(): bool
292278

293279
/**
294280
* Unsupported method.
295-
*
296-
* @return bool Always returns true
297281
*/
298282
public function isEmpty(): bool
299283
{
@@ -302,8 +286,6 @@ public function isEmpty(): bool
302286

303287
/**
304288
* Unsupported method.
305-
*
306-
* @return bool Always returns true
307289
*/
308290
public function isSynchronized(): bool
309291
{
@@ -394,8 +376,6 @@ public function createView(FormView $parent = null): FormView
394376

395377
/**
396378
* Unsupported method.
397-
*
398-
* @return int Always returns 0
399379
*/
400380
public function count(): int
401381
{
@@ -404,8 +384,6 @@ public function count(): int
404384

405385
/**
406386
* Unsupported method.
407-
*
408-
* @return \EmptyIterator Always returns an empty iterator
409387
*/
410388
public function getIterator(): \EmptyIterator
411389
{

Diff for: ButtonBuilder.php

-46
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ public function remove(string $name): static
8989

9090
/**
9191
* Unsupported method.
92-
*
93-
* @return bool Always returns false
9492
*/
9593
public function has(string $name): bool
9694
{
@@ -99,8 +97,6 @@ public function has(string $name): bool
9997

10098
/**
10199
* Returns the children.
102-
*
103-
* @return array Always returns an empty array
104100
*/
105101
public function all(): array
106102
{
@@ -109,8 +105,6 @@ public function all(): array
109105

110106
/**
111107
* Creates the button.
112-
*
113-
* @return Button The button
114108
*/
115109
public function getForm(): Button
116110
{
@@ -437,8 +431,6 @@ public function getPropertyPath(): ?PropertyPathInterface
437431

438432
/**
439433
* Unsupported method.
440-
*
441-
* @return bool Always returns false
442434
*/
443435
public function getMapped(): bool
444436
{
@@ -447,8 +439,6 @@ public function getMapped(): bool
447439

448440
/**
449441
* Unsupported method.
450-
*
451-
* @return bool Always returns false
452442
*/
453443
public function getByReference(): bool
454444
{
@@ -457,8 +447,6 @@ public function getByReference(): bool
457447

458448
/**
459449
* Unsupported method.
460-
*
461-
* @return bool Always returns false
462450
*/
463451
public function getCompound(): bool
464452
{
@@ -467,8 +455,6 @@ public function getCompound(): bool
467455

468456
/**
469457
* Returns the form type used to construct the button.
470-
*
471-
* @return ResolvedFormTypeInterface The button's type
472458
*/
473459
public function getType(): ResolvedFormTypeInterface
474460
{
@@ -477,8 +463,6 @@ public function getType(): ResolvedFormTypeInterface
477463

478464
/**
479465
* Unsupported method.
480-
*
481-
* @return array Always returns an empty array
482466
*/
483467
public function getViewTransformers(): array
484468
{
@@ -487,8 +471,6 @@ public function getViewTransformers(): array
487471

488472
/**
489473
* Unsupported method.
490-
*
491-
* @return array Always returns an empty array
492474
*/
493475
public function getModelTransformers(): array
494476
{
@@ -505,8 +487,6 @@ public function getDataMapper(): ?DataMapperInterface
505487

506488
/**
507489
* Unsupported method.
508-
*
509-
* @return bool Always returns false
510490
*/
511491
public function getRequired(): bool
512492
{
@@ -515,8 +495,6 @@ public function getRequired(): bool
515495

516496
/**
517497
* Returns whether the button is disabled.
518-
*
519-
* @return bool Whether the button is disabled
520498
*/
521499
public function getDisabled(): bool
522500
{
@@ -525,8 +503,6 @@ public function getDisabled(): bool
525503

526504
/**
527505
* Unsupported method.
528-
*
529-
* @return bool Always returns false
530506
*/
531507
public function getErrorBubbling(): bool
532508
{
@@ -543,8 +519,6 @@ public function getEmptyData(): mixed
543519

544520
/**
545521
* Returns additional attributes of the button.
546-
*
547-
* @return array An array of key-value combinations
548522
*/
549523
public function getAttributes(): array
550524
{
@@ -553,8 +527,6 @@ public function getAttributes(): array
553527

554528
/**
555529
* Returns whether the attribute with the given name exists.
556-
*
557-
* @return bool Whether the attribute exists
558530
*/
559531
public function hasAttribute(string $name): bool
560532
{
@@ -563,8 +535,6 @@ public function hasAttribute(string $name): bool
563535

564536
/**
565537
* Returns the value of the given attribute.
566-
*
567-
* @return mixed The attribute value
568538
*/
569539
public function getAttribute(string $name, mixed $default = null): mixed
570540
{
@@ -589,8 +559,6 @@ public function getDataClass(): ?string
589559

590560
/**
591561
* Unsupported method.
592-
*
593-
* @return bool Always returns false
594562
*/
595563
public function getDataLocked(): bool
596564
{
@@ -637,8 +605,6 @@ public function getRequestHandler(): RequestHandlerInterface
637605

638606
/**
639607
* Unsupported method.
640-
*
641-
* @return bool Always returns false
642608
*/
643609
public function getAutoInitialize(): bool
644610
{
@@ -647,8 +613,6 @@ public function getAutoInitialize(): bool
647613

648614
/**
649615
* Unsupported method.
650-
*
651-
* @return bool Always returns false
652616
*/
653617
public function getInheritData(): bool
654618
{
@@ -657,8 +621,6 @@ public function getInheritData(): bool
657621

658622
/**
659623
* Returns all options passed during the construction of the button.
660-
*
661-
* @return array The passed options
662624
*/
663625
public function getOptions(): array
664626
{
@@ -667,8 +629,6 @@ public function getOptions(): array
667629

668630
/**
669631
* Returns whether a specific option exists.
670-
*
671-
* @return bool Whether the option exists
672632
*/
673633
public function hasOption(string $name): bool
674634
{
@@ -677,8 +637,6 @@ public function hasOption(string $name): bool
677637

678638
/**
679639
* Returns the value of a specific option.
680-
*
681-
* @return mixed The option value
682640
*/
683641
public function getOption(string $name, mixed $default = null): mixed
684642
{
@@ -697,8 +655,6 @@ public function getIsEmptyCallback(): ?callable
697655

698656
/**
699657
* Unsupported method.
700-
*
701-
* @return int Always returns 0
702658
*/
703659
public function count(): int
704660
{
@@ -707,8 +663,6 @@ public function count(): int
707663

708664
/**
709665
* Unsupported method.
710-
*
711-
* @return \EmptyIterator Always returns an empty iterator
712666
*/
713667
public function getIterator(): \EmptyIterator
714668
{

Diff for: ChoiceList/ChoiceListInterface.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function getChoices(): array;
5555
* Null and false MUST NOT conflict when being casted to string.
5656
* For this some default incremented values SHOULD be computed.
5757
*
58-
* @return string[] The choice values
58+
* @return string[]
5959
*/
6060
public function getValues(): array;
6161

@@ -86,7 +86,7 @@ public function getValues(): array;
8686
* this method SHOULD be equivalent to {@link getValues()}.
8787
* The $groupBy callback parameter SHOULD be used instead.
8888
*
89-
* @return string[] The choice values
89+
* @return string[]
9090
*/
9191
public function getStructuredValues(): array;
9292

@@ -120,8 +120,6 @@ public function getOriginalKeys(): array;
120120
*
121121
* @param string[] $values An array of choice values. Non-existing values in
122122
* this array are ignored
123-
*
124-
* @return array An array of choices
125123
*/
126124
public function getChoicesForValues(array $values): array;
127125

@@ -134,7 +132,7 @@ public function getChoicesForValues(array $values): array;
134132
* @param array $choices An array of choices. Non-existing choices in this
135133
* array are ignored
136134
*
137-
* @return string[] An array of choice values
135+
* @return string[]
138136
*/
139137
public function getValuesForChoices(array $choices): array;
140138
}

Diff for: ChoiceList/Factory/CachingFactoryDecorator.php

-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ public function __construct(ChoiceListFactoryInterface $decoratedFactory)
7171

7272
/**
7373
* Returns the decorated factory.
74-
*
75-
* @return ChoiceListFactoryInterface The decorated factory
7674
*/
7775
public function getDecoratedFactory(): ChoiceListFactoryInterface
7876
{

Diff for: ChoiceList/Factory/ChoiceListFactoryInterface.php

-6
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ interface ChoiceListFactoryInterface
3232
* Null may be passed when the choice list contains the empty value.
3333
*
3434
* @param callable|null $filter The callable filtering the choices
35-
*
36-
* @return ChoiceListInterface The choice list
3735
*/
3836
public function createListFromChoices(iterable $choices, callable $value = null, callable $filter = null): ChoiceListInterface;
3937

@@ -45,8 +43,6 @@ public function createListFromChoices(iterable $choices, callable $value = null,
4543
* Null may be passed when the choice list contains the empty value.
4644
*
4745
* @param callable|null $filter The callable filtering the choices
48-
*
49-
* @return ChoiceListInterface The choice list
5046
*/
5147
public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null, callable $filter = null): ChoiceListInterface;
5248

@@ -81,8 +77,6 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, callable $va
8177
* pass false to discard the label
8278
* @param array|callable|null $attr The callable generating the HTML attributes
8379
* @param array|callable $labelTranslationParameters The parameters used to translate the choice labels
84-
*
85-
* @return ChoiceListView The choice list view
8680
*/
8781
public function createView(ChoiceListInterface $list, array|callable $preferredChoices = null, callable|false $label = null, callable $index = null, callable $groupBy = null, array|callable $attr = null, array|callable $labelTranslationParameters = []): ChoiceListView;
8882
}

0 commit comments

Comments
 (0)