Skip to content

Commit d78da77

Browse files
wouterjnicolas-grekas
authored andcommitted
Add missing PHPdoc return types
1 parent ac6ea73 commit d78da77

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

ButtonBuilder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,19 @@ public function resetModelTransformers(): static
173173
throw new BadMethodCallException('Buttons do not support data transformers.');
174174
}
175175

176+
/**
177+
* @return $this
178+
*/
176179
public function setAttribute(string $name, mixed $value): static
177180
{
178181
$this->attributes[$name] = $value;
179182

180183
return $this;
181184
}
182185

186+
/**
187+
* @return $this
188+
*/
183189
public function setAttributes(array $attributes): static
184190
{
185191
$this->attributes = $attributes;

FormConfigBuilder.php

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ public function getIsEmptyCallback(): ?callable
316316
return $this->isEmptyCallback;
317317
}
318318

319+
/**
320+
* @return $this
321+
*/
319322
public function setAttribute(string $name, mixed $value): static
320323
{
321324
if ($this->locked) {
@@ -327,6 +330,9 @@ public function setAttribute(string $name, mixed $value): static
327330
return $this;
328331
}
329332

333+
/**
334+
* @return $this
335+
*/
330336
public function setAttributes(array $attributes): static
331337
{
332338
if ($this->locked) {
@@ -338,6 +344,9 @@ public function setAttributes(array $attributes): static
338344
return $this;
339345
}
340346

347+
/**
348+
* @return $this
349+
*/
341350
public function setDataMapper(DataMapperInterface $dataMapper = null): static
342351
{
343352
if (1 > \func_num_args()) {
@@ -352,6 +361,9 @@ public function setDataMapper(DataMapperInterface $dataMapper = null): static
352361
return $this;
353362
}
354363

364+
/**
365+
* @return $this
366+
*/
355367
public function setDisabled(bool $disabled): static
356368
{
357369
if ($this->locked) {
@@ -363,6 +375,9 @@ public function setDisabled(bool $disabled): static
363375
return $this;
364376
}
365377

378+
/**
379+
* @return $this
380+
*/
366381
public function setEmptyData(mixed $emptyData): static
367382
{
368383
if ($this->locked) {
@@ -374,6 +389,9 @@ public function setEmptyData(mixed $emptyData): static
374389
return $this;
375390
}
376391

392+
/**
393+
* @return $this
394+
*/
377395
public function setErrorBubbling(bool $errorBubbling): static
378396
{
379397
if ($this->locked) {
@@ -385,6 +403,9 @@ public function setErrorBubbling(bool $errorBubbling): static
385403
return $this;
386404
}
387405

406+
/**
407+
* @return $this
408+
*/
388409
public function setRequired(bool $required): static
389410
{
390411
if ($this->locked) {
@@ -396,6 +417,9 @@ public function setRequired(bool $required): static
396417
return $this;
397418
}
398419

420+
/**
421+
* @return $this
422+
*/
399423
public function setPropertyPath(string|PropertyPathInterface|null $propertyPath): static
400424
{
401425
if ($this->locked) {
@@ -411,6 +435,9 @@ public function setPropertyPath(string|PropertyPathInterface|null $propertyPath)
411435
return $this;
412436
}
413437

438+
/**
439+
* @return $this
440+
*/
414441
public function setMapped(bool $mapped): static
415442
{
416443
if ($this->locked) {
@@ -422,6 +449,9 @@ public function setMapped(bool $mapped): static
422449
return $this;
423450
}
424451

452+
/**
453+
* @return $this
454+
*/
425455
public function setByReference(bool $byReference): static
426456
{
427457
if ($this->locked) {
@@ -433,6 +463,9 @@ public function setByReference(bool $byReference): static
433463
return $this;
434464
}
435465

466+
/**
467+
* @return $this
468+
*/
436469
public function setInheritData(bool $inheritData): static
437470
{
438471
if ($this->locked) {
@@ -444,6 +477,9 @@ public function setInheritData(bool $inheritData): static
444477
return $this;
445478
}
446479

480+
/**
481+
* @return $this
482+
*/
447483
public function setCompound(bool $compound): static
448484
{
449485
if ($this->locked) {
@@ -455,6 +491,9 @@ public function setCompound(bool $compound): static
455491
return $this;
456492
}
457493

494+
/**
495+
* @return $this
496+
*/
458497
public function setType(ResolvedFormTypeInterface $type): static
459498
{
460499
if ($this->locked) {
@@ -466,6 +505,9 @@ public function setType(ResolvedFormTypeInterface $type): static
466505
return $this;
467506
}
468507

508+
/**
509+
* @return $this
510+
*/
469511
public function setData(mixed $data): static
470512
{
471513
if ($this->locked) {
@@ -477,6 +519,9 @@ public function setData(mixed $data): static
477519
return $this;
478520
}
479521

522+
/**
523+
* @return $this
524+
*/
480525
public function setDataLocked(bool $locked): static
481526
{
482527
if ($this->locked) {
@@ -488,6 +533,9 @@ public function setDataLocked(bool $locked): static
488533
return $this;
489534
}
490535

536+
/**
537+
* @return $this
538+
*/
491539
public function setFormFactory(FormFactoryInterface $formFactory)
492540
{
493541
if ($this->locked) {
@@ -499,6 +547,9 @@ public function setFormFactory(FormFactoryInterface $formFactory)
499547
return $this;
500548
}
501549

550+
/**
551+
* @return $this
552+
*/
502553
public function setAction(string $action): static
503554
{
504555
if ($this->locked) {
@@ -510,6 +561,9 @@ public function setAction(string $action): static
510561
return $this;
511562
}
512563

564+
/**
565+
* @return $this
566+
*/
513567
public function setMethod(string $method): static
514568
{
515569
if ($this->locked) {
@@ -521,6 +575,9 @@ public function setMethod(string $method): static
521575
return $this;
522576
}
523577

578+
/**
579+
* @return $this
580+
*/
524581
public function setRequestHandler(RequestHandlerInterface $requestHandler): static
525582
{
526583
if ($this->locked) {
@@ -532,6 +589,9 @@ public function setRequestHandler(RequestHandlerInterface $requestHandler): stat
532589
return $this;
533590
}
534591

592+
/**
593+
* @return $this
594+
*/
535595
public function setAutoInitialize(bool $initialize): static
536596
{
537597
if ($this->locked) {
@@ -556,6 +616,9 @@ public function getFormConfig(): FormConfigInterface
556616
return $config;
557617
}
558618

619+
/**
620+
* @return $this
621+
*/
559622
public function setIsEmptyCallback(?callable $isEmptyCallback): static
560623
{
561624
$this->isEmptyCallback = null === $isEmptyCallback ? null : $isEmptyCallback(...);

FormConfigBuilderInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ public function setDataLocked(bool $locked): static;
205205

206206
/**
207207
* Sets the form factory used for creating new forms.
208+
*
209+
* @return $this
208210
*/
209211
public function setFormFactory(FormFactoryInterface $formFactory);
210212

0 commit comments

Comments
 (0)