File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
src/Symfony/Component/PropertyAccess Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -21,25 +21,36 @@ final class PropertyAccess
21
21
/**
22
22
* Creates a property accessor with the default configuration.
23
23
*
24
- * @param bool $throwExceptionOnInvalidIndex
24
+ * @param bool $throwExceptionOnInvalidIndex Will be added to the signature in 4.0
25
25
*
26
26
* @return PropertyAccessor The new property accessor
27
27
*/
28
- public static function createPropertyAccessor ($ throwExceptionOnInvalidIndex = false )
28
+ public static function createPropertyAccessor (/* $throwExceptionOnInvalidIndex = false */ )
29
29
{
30
+ $ throwExceptionOnInvalidIndex = false ;
31
+
32
+ if (func_num_args ()) {
33
+ $ throwExceptionOnInvalidIndex = func_get_arg (0 );
34
+ }
35
+
30
36
return self ::createPropertyAccessorBuilder ($ throwExceptionOnInvalidIndex )->getPropertyAccessor ();
31
37
}
32
38
33
39
/**
34
40
* Creates a property accessor builder.
35
41
*
36
- * @param bool $enableExceptionOnInvalidIndex
42
+ * @param bool $enableExceptionOnInvalidIndex Will be added to the signature in 4.0.
37
43
*
38
44
* @return PropertyAccessorBuilder The new property accessor builder
39
45
*/
40
- public static function createPropertyAccessorBuilder ($ enableExceptionOnInvalidIndex = false )
46
+ public static function createPropertyAccessorBuilder (/* $enableExceptionOnInvalidIndex = false */ )
41
47
{
42
48
$ propertyAccessorBuilder = new PropertyAccessorBuilder ();
49
+ $ enableExceptionOnInvalidIndex = false ;
50
+
51
+ if (func_num_args ()) {
52
+ $ enableExceptionOnInvalidIndex = func_get_arg (0 );
53
+ }
43
54
44
55
if ($ enableExceptionOnInvalidIndex ) {
45
56
$ propertyAccessorBuilder ->enableExceptionOnInvalidIndex ();
You can’t perform that action at this time.
0 commit comments