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