Skip to content

Commit

Permalink
[CI] PHP CS Fixer it up (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
bocharsky-bw committed Feb 20, 2024
1 parent d8812e2 commit 1bfe844
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/DependentField.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DependentField
private array $options = [];
private bool $shouldBeAdded = false;

public function add(string $type = null, array $options = []): static
public function add(?string $type = null, array $options = []): static
{
$this->type = $type;
$this->options = $options;
Expand Down
8 changes: 4 additions & 4 deletions src/DynamicFormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private function executeReadyCallbacks(array $availableDependencyData, string $e
}
}

private function initializeListeners(array $fieldsToConsider = null): void
private function initializeListeners(?array $fieldsToConsider = null): void
{
$registeredFields = [];
foreach ($this->dependentFieldConfigs as $dynamicField) {
Expand Down Expand Up @@ -194,14 +194,14 @@ public function count(): int
/**
* @param string|FormBuilderInterface $child
*/
public function add($child, string $type = null, array $options = []): static
public function add($child, ?string $type = null, array $options = []): static
{
$this->builder->add($child, $type, $options);

return $this;
}

public function create(string $name, string $type = null, array $options = []): FormBuilderInterface
public function create(string $name, ?string $type = null, array $options = []): FormBuilderInterface
{
return $this->builder->create($name, $type, $options);
}
Expand Down Expand Up @@ -289,7 +289,7 @@ public function setAttributes(array $attributes): static
return $this;
}

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

Expand Down

0 comments on commit 1bfe844

Please sign in to comment.