Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 612cf26

Browse filesBrowse files
committed
Remove ? for arguments with default null
1 parent 15fa7d4 commit 612cf26
Copy full SHA for 612cf26

9 files changed

+17
-17
lines changed

‎src/Symfony/Component/Form/Button.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Button.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function getParent()
132132
*
133133
* @throws BadMethodCallException
134134
*/
135-
public function add($child, ?string $type = null, array $options = [])
135+
public function add($child, string $type = null, array $options = [])
136136
{
137137
throw new BadMethodCallException('Buttons cannot have children.');
138138
}

‎src/Symfony/Component/Form/ButtonBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ButtonBuilder.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function __construct(?string $name, array $options = [])
7575
*
7676
* @throws BadMethodCallException
7777
*/
78-
public function add($child, ?string $type = null, array $options = [])
78+
public function add($child, string $type = null, array $options = [])
7979
{
8080
throw new BadMethodCallException('Buttons cannot have children.');
8181
}
@@ -91,7 +91,7 @@ public function add($child, ?string $type = null, array $options = [])
9191
*
9292
* @throws BadMethodCallException
9393
*/
94-
public function create($name, ?string $type = null, array $options = [])
94+
public function create($name, string $type = null, array $options = [])
9595
{
9696
throw new BadMethodCallException('Buttons cannot have children.');
9797
}

‎src/Symfony/Component/Form/ChoiceList/Loader/CallbackChoiceLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ChoiceList/Loader/CallbackChoiceLoader.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(callable $callback)
4040
/**
4141
* {@inheritdoc}
4242
*/
43-
public function loadChoiceList(?callable $value = null)
43+
public function loadChoiceList(callable $value = null)
4444
{
4545
if (null !== $this->choiceList) {
4646
return $this->choiceList;
@@ -52,7 +52,7 @@ public function loadChoiceList(?callable $value = null)
5252
/**
5353
* {@inheritdoc}
5454
*/
55-
public function loadChoicesForValues(array $values, ?callable $value = null)
55+
public function loadChoicesForValues(array $values, callable $value = null)
5656
{
5757
// Optimize
5858
if (empty($values)) {
@@ -65,7 +65,7 @@ public function loadChoicesForValues(array $values, ?callable $value = null)
6565
/**
6666
* {@inheritdoc}
6767
*/
68-
public function loadValuesForChoices(array $choices, ?callable $value = null)
68+
public function loadValuesForChoices(array $choices, callable $value = null)
6969
{
7070
// Optimize
7171
if (empty($choices)) {

‎src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface ChoiceLoaderInterface
3636
*
3737
* @return ChoiceListInterface The loaded choice list
3838
*/
39-
public function loadChoiceList(?callable $value = null);
39+
public function loadChoiceList(callable $value = null);
4040

4141
/**
4242
* Loads the choices corresponding to the given values.
@@ -54,7 +54,7 @@ public function loadChoiceList(?callable $value = null);
5454
*
5555
* @return array An array of choices
5656
*/
57-
public function loadChoicesForValues(array $values, ?callable $value = null);
57+
public function loadChoicesForValues(array $values, callable $value = null);
5858

5959
/**
6060
* Loads the values corresponding to the given choices.
@@ -72,5 +72,5 @@ public function loadChoicesForValues(array $values, ?callable $value = null);
7272
*
7373
* @return string[] An array of choice values
7474
*/
75-
public function loadValuesForChoices(array $choices, ?callable $value = null);
75+
public function loadValuesForChoices(array $choices, callable $value = null);
7676
}

‎src/Symfony/Component/Form/ChoiceList/Loader/IntlCallbackChoiceLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ChoiceList/Loader/IntlCallbackChoiceLoader.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class IntlCallbackChoiceLoader extends CallbackChoiceLoader
2222
/**
2323
* {@inheritdoc}
2424
*/
25-
public function loadChoicesForValues(array $values, ?callable $value = null)
25+
public function loadChoicesForValues(array $values, callable $value = null)
2626
{
2727
// Optimize
2828
$values = array_filter($values);
@@ -36,7 +36,7 @@ public function loadChoicesForValues(array $values, ?callable $value = null)
3636
/**
3737
* {@inheritdoc}
3838
*/
39-
public function loadValuesForChoices(array $choices, ?callable $value = null)
39+
public function loadValuesForChoices(array $choices, callable $value = null)
4040
{
4141
// Optimize
4242
$choices = array_filter($choices);

‎src/Symfony/Component/Form/Form.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Form.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ public function all()
831831
/**
832832
* {@inheritdoc}
833833
*/
834-
public function add($child, ?string $type = null, array $options = [])
834+
public function add($child, string $type = null, array $options = [])
835835
{
836836
if ($this->submitted) {
837837
throw new AlreadySubmittedException('You cannot add children to a submitted form');

‎src/Symfony/Component/Form/FormBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormBuilder.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(?string $name, ?string $dataClass, EventDispatcherIn
4747
/**
4848
* {@inheritdoc}
4949
*/
50-
public function add($child, ?string $type = null, array $options = [])
50+
public function add($child, string $type = null, array $options = [])
5151
{
5252
if ($this->locked) {
5353
throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
@@ -76,7 +76,7 @@ public function add($child, ?string $type = null, array $options = [])
7676
/**
7777
* {@inheritdoc}
7878
*/
79-
public function create($name, ?string $type = null, array $options = [])
79+
public function create($name, string $type = null, array $options = [])
8080
{
8181
if ($this->locked) {
8282
throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');

‎src/Symfony/Component/Form/FormBuilderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormBuilderInterface.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
2929
*
3030
* @return self
3131
*/
32-
public function add($child, ?string $type = null, array $options = []);
32+
public function add($child, string $type = null, array $options = []);
3333

3434
/**
3535
* Creates a form builder.
@@ -40,7 +40,7 @@ public function add($child, ?string $type = null, array $options = []);
4040
*
4141
* @return self
4242
*/
43-
public function create($name, ?string $type = null, array $options = []);
43+
public function create($name, string $type = null, array $options = []);
4444

4545
/**
4646
* Returns a child by name.

‎src/Symfony/Component/Form/FormInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getParent();
5353
* @throws Exception\LogicException when trying to add a child to a non-compound form
5454
* @throws Exception\UnexpectedTypeException if $child or $type has an unexpected type
5555
*/
56-
public function add($child, ?string $type = null, array $options = []);
56+
public function add($child, string $type = null, array $options = []);
5757

5858
/**
5959
* Returns the child with the given name.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.