src/ConstraintCheck/Message/ViolationMessageRenderer.php 1 location
|
@@ 124-131 (lines=8) @@
|
121 |
|
$value = $argument['value']; |
122 |
|
$role = $argument['role']; |
123 |
|
|
124 |
|
if ( array_key_exists( $type, $methods ) ) { |
125 |
|
$method = $methods[$type]; |
126 |
|
$params = $this->$method( $value, $role ); |
127 |
|
} else { |
128 |
|
throw new InvalidArgumentException( |
129 |
|
'Unknown ViolationMessage argument type ' . $type . '!' |
130 |
|
); |
131 |
|
} |
132 |
|
|
133 |
|
return $params; |
134 |
|
} |
src/ConstraintCheck/Message/ViolationMessageSerializer.php 1 location
|
@@ 53-60 (lines=8) @@
|
50 |
|
$value = $argument['value']; |
51 |
|
$role = $argument['role']; |
52 |
|
|
53 |
|
if ( array_key_exists( $type, $methods ) ) { |
54 |
|
$method = $methods[$type]; |
55 |
|
$serializedValue = $this->$method( $value ); |
56 |
|
} else { |
57 |
|
throw new InvalidArgumentException( |
58 |
|
'Unknown ViolationMessage argument type ' . $type . '!' |
59 |
|
); |
60 |
|
} |
61 |
|
|
62 |
|
$serialized = [ |
63 |
|
't' => $type, |
src/ConstraintCheck/Message/ViolationMessageDeserializer.php 1 location
|
@@ 59-66 (lines=8) @@
|
56 |
|
$alternativeMessageKey = null; |
57 |
|
} |
58 |
|
|
59 |
|
if ( array_key_exists( $type, $methods ) ) { |
60 |
|
$method = $methods[$type]; |
61 |
|
$value = $this->$method( $serializedValue ); |
62 |
|
} else { |
63 |
|
throw new InvalidArgumentException( |
64 |
|
'Unknown ViolationMessage argument type ' . $type . '!' |
65 |
|
); |
66 |
|
} |
67 |
|
|
68 |
|
return $message->withArgument( $type, $role, $value, $alternativeMessageKey ); |
69 |
|
} |