File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Serializer \Normalizer ;
13
13
14
+ use Symfony \Component \Serializer \Exception \InvalidArgumentException ;
14
15
use Symfony \Component \Serializer \Exception \RuntimeException ;
15
16
16
17
/**
@@ -42,12 +43,14 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
42
43
* Set normalization callbacks
43
44
*
44
45
* @param array $callbacks help normalize the result
46
+ *
47
+ * @throws InvalidArgumentException if a non-callable callback is set
45
48
*/
46
49
public function setCallbacks (array $ callbacks )
47
50
{
48
51
foreach ($ callbacks as $ attribute => $ callback ) {
49
52
if (!is_callable ($ callback )) {
50
- throw new \ InvalidArgumentException (sprintf ('The given callback for attribute "%s" is not callable. ' , $ attribute ));
53
+ throw new InvalidArgumentException (sprintf ('The given callback for attribute "%s" is not callable. ' , $ attribute ));
51
54
}
52
55
}
53
56
$ this ->callbacks = $ callbacks ;
You can’t perform that action at this time.
0 commit comments