Skip to content

Commit 392d486

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 4c12f0d + 196dbc0 commit 392d486

File tree

6 files changed

+4
-44
lines changed

6 files changed

+4
-44
lines changed

AbstractUriElement.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ public function getNode(): \DOMElement
6363

6464
/**
6565
* Gets the method associated with this link.
66-
*
67-
* @return string The method
6866
*/
6967
public function getMethod(): string
7068
{
@@ -73,8 +71,6 @@ public function getMethod(): string
7371

7472
/**
7573
* Gets the URI associated with this link.
76-
*
77-
* @return string The URI
7874
*/
7975
public function getUri(): string
8076
{

Crawler.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,6 @@ public function children(string $selector = null): static
510510
/**
511511
* Returns the attribute value of the first node of the list.
512512
*
513-
* @return string|null The attribute value or null if the attribute does not exist
514-
*
515513
* @throws \InvalidArgumentException When current node is empty
516514
*/
517515
public function attr(string $attribute): ?string
@@ -528,8 +526,6 @@ public function attr(string $attribute): ?string
528526
/**
529527
* Returns the node name of the first node of the list.
530528
*
531-
* @return string The node name
532-
*
533529
* @throws \InvalidArgumentException When current node is empty
534530
*/
535531
public function nodeName(): string
@@ -549,8 +545,6 @@ public function nodeName(): string
549545
* @param string|null $default When not null: the value to return when the current node is empty
550546
* @param bool $normalizeWhitespace Whether whitespaces should be trimmed and normalized to single spaces
551547
*
552-
* @return string The node value
553-
*
554548
* @throws \InvalidArgumentException When current node is empty
555549
*/
556550
public function text(string $default = null, bool $normalizeWhitespace = true): string
@@ -577,8 +571,6 @@ public function text(string $default = null, bool $normalizeWhitespace = true):
577571
*
578572
* @param string|null $default When not null: the value to return when the current node is empty
579573
*
580-
* @return string The node html
581-
*
582574
* @throws \InvalidArgumentException When current node is empty
583575
*/
584576
public function html(string $default = null): string
@@ -658,8 +650,6 @@ public function evaluate(string $xpath): array|Crawler
658650
* Example:
659651
*
660652
* $crawler->filter('h1 a')->extract(['_text', 'href']);
661-
*
662-
* @return array An array of extracted values
663653
*/
664654
public function extract(array $attributes): array
665655
{
@@ -883,8 +873,6 @@ public function registerNamespace(string $prefix, string $namespace)
883873
*
884874
* echo Crawler::xpathLiteral('a\'b"c');
885875
* //prints concat('a', "'", 'b"c')
886-
*
887-
* @return string Converted string
888876
*/
889877
public static function xpathLiteral(string $s): string
890878
{

Field/ChoiceFormField.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ public function addChoice(\DOMElement $node)
157157

158158
/**
159159
* Returns the type of the choice field (radio, select, or checkbox).
160-
*
161-
* @return string The type
162160
*/
163161
public function getType(): string
164162
{
@@ -167,8 +165,6 @@ public function getType(): string
167165

168166
/**
169167
* Returns true if the field accepts multiple values.
170-
*
171-
* @return bool true if the field accepts multiple values, false otherwise
172168
*/
173169
public function isMultiple(): bool
174170
{

Field/FormField.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ public function getLabel(): ?\DOMElement
7676

7777
/**
7878
* Returns the name of the field.
79-
*
80-
* @return string The name of the field
8179
*/
8280
public function getName(): string
8381
{
@@ -102,8 +100,6 @@ public function setValue(?string $value)
102100

103101
/**
104102
* Returns true if the field should be included in the submitted values.
105-
*
106-
* @return bool true if the field should be included in the submitted values, false otherwise
107103
*/
108104
public function hasValue(): bool
109105
{

Form.php

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public function setValues(array $values): static
6969
* Gets the field values.
7070
*
7171
* The returned array does not include file fields (@see getFiles).
72-
*
73-
* @return array An array of field values
7472
*/
7573
public function getValues(): array
7674
{
@@ -90,8 +88,6 @@ public function getValues(): array
9088

9189
/**
9290
* Gets the file field values.
93-
*
94-
* @return array An array of file field values
9591
*/
9692
public function getFiles(): array
9793
{
@@ -119,8 +115,6 @@ public function getFiles(): array
119115
*
120116
* This method converts fields with the array notation
121117
* (like foo[bar] to arrays) like PHP does.
122-
*
123-
* @return array An array of field values
124118
*/
125119
public function getPhpValues(): array
126120
{
@@ -146,8 +140,6 @@ public function getPhpValues(): array
146140
* (@see getPhpValues), rather than uploaded files found in $_FILES.
147141
* For a compound file field foo[bar] it will create foo[bar][name],
148142
* instead of foo[name][bar] which would be found in $_FILES.
149-
*
150-
* @return array An array of file field values
151143
*/
152144
public function getPhpFiles(): array
153145
{
@@ -182,8 +174,6 @@ function (&$value, $key) {
182174
* The returned URI is not the same as the form "action" attribute.
183175
* This method merges the value if the method is GET to mimics
184176
* browser behavior.
185-
*
186-
* @return string The URI
187177
*/
188178
public function getUri(): string
189179
{
@@ -220,8 +210,6 @@ protected function getRawUri(): string
220210
* Gets the form method.
221211
*
222212
* If no method is defined in the form, GET is returned.
223-
*
224-
* @return string The method
225213
*/
226214
public function getMethod(): string
227215
{
@@ -249,8 +237,6 @@ public function getName(): string
249237

250238
/**
251239
* Returns true if the named field exists.
252-
*
253-
* @return bool true if the field exists, false otherwise
254240
*/
255241
public function has(string $name): bool
256242
{
@@ -268,7 +254,7 @@ public function remove(string $name)
268254
/**
269255
* Gets a named field.
270256
*
271-
* @return FormField|FormField[]|FormField[][] The value of the field
257+
* @return FormField|FormField[]|FormField[][]
272258
*
273259
* @throws \InvalidArgumentException When field is not present in this form
274260
*/
@@ -310,7 +296,7 @@ public function offsetExists(mixed $name): bool
310296
*
311297
* @param string $name The field name
312298
*
313-
* @return FormField|FormField[]|FormField[][] The value of the field
299+
* @return FormField|FormField[]|FormField[][]
314300
*
315301
* @throws \InvalidArgumentException if the field does not exist
316302
*/

FormFieldRegistry.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function remove(string $name)
6565
/**
6666
* Returns the value of the field based on the fully qualifed name and its children.
6767
*
68-
* @return FormField|FormField[]|FormField[][] The value of the field
68+
* @return FormField|FormField[]|FormField[][]
6969
*
7070
* @throws \InvalidArgumentException if the field does not exist
7171
*/
@@ -86,8 +86,6 @@ public function &get(string $name): FormField|array
8686

8787
/**
8888
* Tests whether the form has the given field based on the fully qualified name.
89-
*
90-
* @return bool Whether the form has the given field
9189
*/
9290
public function has(string $name): bool
9391
{
@@ -154,7 +152,7 @@ private function walk(array $array, ?string $base = '', array &$output = []): ar
154152
*
155153
* getSegments('base[foo][3][]') = ['base', 'foo, '3', ''];
156154
*
157-
* @return string[] The list of segments
155+
* @return string[]
158156
*/
159157
private function getSegments(string $name): array
160158
{

0 commit comments

Comments
 (0)