Skip to content

Commit

Permalink
bug #7 Fix method signatures for legacy compatibility (Frans Weerts)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the main branch.

Discussion
----------

Fix method signatures for legacy compatibility

Fixes #5

Commits
-------

090e89d Fix method signatures for legacy compatibility
  • Loading branch information
weaverryan committed Sep 22, 2023
2 parents 28ac99d + 090e89d commit dae0100
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/DynamicFormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ public function count(): int
return $this->builder->count();
}

public function add(string|FormBuilderInterface $child, string $type = null, array $options = []): static
/**
* @param string|FormBuilderInterface $child
*/
public function add($child, string $type = null, array $options = []): static
{
$this->builder->add($child, $type, $options);

Expand Down Expand Up @@ -286,7 +289,7 @@ public function setAttributes(array $attributes): static
return $this;
}

public function setDataMapper(?DataMapperInterface $dataMapper): static
public function setDataMapper(DataMapperInterface $dataMapper = null): static
{
$this->builder->setDataMapper($dataMapper);

Expand Down Expand Up @@ -335,7 +338,10 @@ public function setMethod(string $method): static
return $this;
}

public function setPropertyPath(null|string|PropertyPathInterface $propertyPath): static
/**
* @param string|PropertyPathInterface|null $propertyPath
*/
public function setPropertyPath($propertyPath): static
{
$this->builder->setPropertyPath($propertyPath);

Expand Down

0 comments on commit dae0100

Please sign in to comment.