Skip to content

Commit ecb6dce

Browse files
authored
fix: update identifiers.md (#1745)
1 parent 721009b commit ecb6dce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

core/identifiers.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ final class UuidUriVariableTransformer implements UriVariableTransformerInterfac
108108
*/
109109
public function transform($value, array $types, array $context = []) {
110110
try {
111-
return Uuid::fromString($data);
111+
return Uuid::fromString($value);
112112
} catch (InvalidUuidStringException $e) {
113113
throw new InvalidUriVariableException($e->getMessage());
114114
}
@@ -123,7 +123,13 @@ final class UuidUriVariableTransformer implements UriVariableTransformerInterfac
123123
*/
124124
public function supportsTransformation($value, array $types, array $context = []): bool
125125
{
126-
return is_a($type, Uuid::class, true);
126+
foreach ($types as $type) {
127+
if (is_a($type, Uuid::class, true)) {
128+
return true;
129+
}
130+
}
131+
132+
return false;
127133
}
128134
}
129135
```

0 commit comments

Comments
 (0)