Skip to content

Commit 1bfe844

Browse files
authored
[CI] PHP CS Fixer it up (#18)
1 parent d8812e2 commit 1bfe844

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/DependentField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class DependentField
2020
private array $options = [];
2121
private bool $shouldBeAdded = false;
2222

23-
public function add(string $type = null, array $options = []): static
23+
public function add(?string $type = null, array $options = []): static
2424
{
2525
$this->type = $type;
2626
$this->options = $options;

src/DynamicFormBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ private function executeReadyCallbacks(array $availableDependencyData, string $e
152152
}
153153
}
154154

155-
private function initializeListeners(array $fieldsToConsider = null): void
155+
private function initializeListeners(?array $fieldsToConsider = null): void
156156
{
157157
$registeredFields = [];
158158
foreach ($this->dependentFieldConfigs as $dynamicField) {
@@ -194,14 +194,14 @@ public function count(): int
194194
/**
195195
* @param string|FormBuilderInterface $child
196196
*/
197-
public function add($child, string $type = null, array $options = []): static
197+
public function add($child, ?string $type = null, array $options = []): static
198198
{
199199
$this->builder->add($child, $type, $options);
200200

201201
return $this;
202202
}
203203

204-
public function create(string $name, string $type = null, array $options = []): FormBuilderInterface
204+
public function create(string $name, ?string $type = null, array $options = []): FormBuilderInterface
205205
{
206206
return $this->builder->create($name, $type, $options);
207207
}
@@ -289,7 +289,7 @@ public function setAttributes(array $attributes): static
289289
return $this;
290290
}
291291

292-
public function setDataMapper(DataMapperInterface $dataMapper = null): static
292+
public function setDataMapper(?DataMapperInterface $dataMapper = null): static
293293
{
294294
$this->builder->setDataMapper($dataMapper);
295295

0 commit comments

Comments
 (0)