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
2121 /**
2222 * Creates a property accessor with the default configuration.
2323 *
24- * @param bool $throwExceptionOnInvalidIndex
24+ * @param bool $throwExceptionOnInvalidIndex Will be added to the signature in 4.0
2525 *
2626 * @return PropertyAccessor The new property accessor
2727 */
28- public static function createPropertyAccessor ($ throwExceptionOnInvalidIndex = false )
28+ public static function createPropertyAccessor (/* $throwExceptionOnInvalidIndex = false */ )
2929 {
30+ $ throwExceptionOnInvalidIndex = false ;
31+
32+ if (func_num_args ()) {
33+ $ throwExceptionOnInvalidIndex = func_get_arg (0 );
34+ }
35+
3036 return self ::createPropertyAccessorBuilder ($ throwExceptionOnInvalidIndex )->getPropertyAccessor ();
3137 }
3238
3339 /**
3440 * Creates a property accessor builder.
3541 *
36- * @param bool $enableExceptionOnInvalidIndex
42+ * @param bool $enableExceptionOnInvalidIndex Will be added to the signature in 4.0.
3743 *
3844 * @return PropertyAccessorBuilder The new property accessor builder
3945 */
40- public static function createPropertyAccessorBuilder ($ enableExceptionOnInvalidIndex = false )
46+ public static function createPropertyAccessorBuilder (/* $enableExceptionOnInvalidIndex = false */ )
4147 {
4248 $ propertyAccessorBuilder = new PropertyAccessorBuilder ();
49+ $ enableExceptionOnInvalidIndex = false ;
50+
51+ if (func_num_args ()) {
52+ $ enableExceptionOnInvalidIndex = func_get_arg (0 );
53+ }
4354
4455 if ($ enableExceptionOnInvalidIndex ) {
4556 $ propertyAccessorBuilder ->enableExceptionOnInvalidIndex ();
You can’t perform that action at this time.
0 commit comments