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 6d4dcad

Browse filesBrowse files
[Form] update type of form $name arguments
1 parent 3f43186 commit 6d4dcad
Copy full SHA for 6d4dcad

7 files changed

+21
-28
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ButtonBuilder.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ public function __construct($name, array $options = [])
7171
*
7272
* This method should not be invoked.
7373
*
74-
* @param string|int|FormBuilderInterface $child
75-
* @param string|FormTypeInterface $type
76-
* @param array $options
74+
* @param string|FormBuilderInterface $child
75+
* @param string|FormTypeInterface $type
7776
*
7877
* @throws BadMethodCallException
7978
*/

‎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
@@ -819,7 +819,7 @@ public function add($child, $type = null, array $options = [])
819819

820820
if (!$child instanceof FormInterface) {
821821
if (!\is_string($child) && !\is_int($child)) {
822-
throw new UnexpectedTypeException($child, 'string, integer or Symfony\Component\Form\FormInterface');
822+
throw new UnexpectedTypeException($child, 'string or Symfony\Component\Form\FormInterface');
823823
}
824824

825825
if (null !== $type && !\is_string($type) && !$type instanceof FormTypeInterface) {

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormBuilder.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function add($child, $type = null, array $options = [])
7070
}
7171

7272
if (!\is_string($child) && !\is_int($child)) {
73-
throw new UnexpectedTypeException($child, 'string, integer or Symfony\Component\Form\FormBuilderInterface');
73+
throw new UnexpectedTypeException($child, 'string or Symfony\Component\Form\FormBuilderInterface');
7474
}
7575

7676
if (null !== $type && !\is_string($type) && !$type instanceof FormTypeInterface) {

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormBuilderInterface.php
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
2323
* If you add a nested group, this group should also be represented in the
2424
* object hierarchy.
2525
*
26-
* @param string|int|FormBuilderInterface $child
27-
* @param string|null $type
28-
* @param array $options
26+
* @param string|FormBuilderInterface $child
27+
* @param string|null $type
2928
*
3029
* @return self
3130
*/
@@ -34,9 +33,8 @@ public function add($child, $type = null, array $options = []);
3433
/**
3534
* Creates a form builder.
3635
*
37-
* @param string $name The name of the form or the name of the property
38-
* @param string|null $type The type of the form or null if name is a property
39-
* @param array $options The options
36+
* @param string $name The name of the form or the name of the property
37+
* @param string|null $type The type of the form or null if name is a property
4038
*
4139
* @return self
4240
*/

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormConfigBuilder.php
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,8 @@ class FormConfigBuilder implements FormConfigBuilderInterface
121121
/**
122122
* Creates an empty form configuration.
123123
*
124-
* @param string|int $name The form name
125-
* @param string|null $dataClass The class of the form's data
126-
* @param EventDispatcherInterface $dispatcher The event dispatcher
127-
* @param array $options The form options
124+
* @param string $name The form name
125+
* @param string|null $dataClass The class of the form's data
128126
*
129127
* @throws InvalidArgumentException if the data class is not a valid class or if
130128
* the name contains invalid characters
@@ -787,15 +785,15 @@ public function getFormConfig()
787785
/**
788786
* Validates whether the given variable is a valid form name.
789787
*
790-
* @param string|int|null $name The tested form name
788+
* @param string|null $name The tested form name
791789
*
792790
* @throws UnexpectedTypeException if the name is not a string or an integer
793791
* @throws InvalidArgumentException if the name contains invalid characters
794792
*/
795793
public static function validateName($name)
796794
{
797795
if (null !== $name && !\is_string($name) && !\is_int($name)) {
798-
throw new UnexpectedTypeException($name, 'string, integer or null');
796+
throw new UnexpectedTypeException($name, 'string or null');
799797
}
800798

801799
if (!self::isValidName($name)) {

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormFactoryInterface.php
+6-8Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ public function create($type = 'Symfony\Component\Form\Extension\Core\Type\FormT
3636
*
3737
* @see createNamedBuilder()
3838
*
39-
* @param string|int $name The name of the form
40-
* @param string $type The type of the form
41-
* @param mixed $data The initial data
42-
* @param array $options The options
39+
* @param string $name The name of the form
40+
* @param string $type The type of the form
41+
* @param mixed $data The initial data
4342
*
4443
* @return FormInterface The form
4544
*
@@ -79,10 +78,9 @@ public function createBuilder($type = 'Symfony\Component\Form\Extension\Core\Typ
7978
/**
8079
* Returns a form builder.
8180
*
82-
* @param string|int $name The name of the form
83-
* @param string $type The type of the form
84-
* @param mixed $data The initial data
85-
* @param array $options The options
81+
* @param string $name The name of the form
82+
* @param string $type The type of the form
83+
* @param mixed $data The initial data
8684
*
8785
* @return FormBuilderInterface The form builder
8886
*

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormInterface.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public function getParent();
4343
/**
4444
* Adds or replaces a child to the form.
4545
*
46-
* @param FormInterface|string|int $child The FormInterface instance or the name of the child
47-
* @param string|null $type The child's type, if a name was passed
48-
* @param array $options The child's options, if a name was passed
46+
* @param FormInterface|string $child The FormInterface instance or the name of the child
47+
* @param string|null $type The child's type, if a name was passed
48+
* @param array $options The child's options, if a name was passed
4949
*
5050
* @return $this
5151
*

0 commit comments

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