src/ConstraintCheck/Message/ViolationMessageDeserializer.php 1 location
|
@@ 88-95 (lines=8) @@
|
85 |
|
$serializedValue = $serializedArgument['v']; |
86 |
|
$role = $serializedArgument['r']; |
87 |
|
|
88 |
|
if ( array_key_exists( $type, $methods ) ) { |
89 |
|
$method = $methods[$type]; |
90 |
|
$value = $this->$method( $serializedValue ); |
91 |
|
} else { |
92 |
|
throw new InvalidArgumentException( |
93 |
|
'Unknown ViolationMessage argument type ' . $type . '!' |
94 |
|
); |
95 |
|
} |
96 |
|
|
97 |
|
return $message->withArgument( $type, $role, $value ); |
98 |
|
} |
src/ConstraintCheck/Message/ViolationMessageSerializer.php 1 location
|
@@ 69-76 (lines=8) @@
|
66 |
|
$value = $argument['value']; |
67 |
|
$role = $argument['role']; |
68 |
|
|
69 |
|
if ( array_key_exists( $type, $methods ) ) { |
70 |
|
$method = $methods[$type]; |
71 |
|
$serializedValue = $this->$method( $value ); |
72 |
|
} else { |
73 |
|
throw new InvalidArgumentException( |
74 |
|
'Unknown ViolationMessage argument type ' . $type . '!' |
75 |
|
); |
76 |
|
} |
77 |
|
|
78 |
|
$serialized = [ |
79 |
|
't' => $type, |
src/ConstraintCheck/Message/ViolationMessageRenderer.php 1 location
|
@@ 145-152 (lines=8) @@
|
142 |
|
$value = $argument['value']; |
143 |
|
$role = $argument['role']; |
144 |
|
|
145 |
|
if ( array_key_exists( $type, $methods ) ) { |
146 |
|
$method = $methods[$type]; |
147 |
|
$params = $this->$method( $value, $role ); |
148 |
|
} else { |
149 |
|
throw new InvalidArgumentException( |
150 |
|
'Unknown ViolationMessage argument type ' . $type . '!' |
151 |
|
); |
152 |
|
} |
153 |
|
|
154 |
|
return $params; |
155 |
|
} |