Skip to content

Commit

Permalink
Fix callback-method setup
Browse files Browse the repository at this point in the history
  • Loading branch information
curzio-della-santa committed Apr 12, 2021
1 parent 110e803 commit 62c15a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Metadata/Driver/XmlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,15 @@ protected function loadMetadataFromFile(\ReflectionClass $class, string $path):

switch ((string) $method->attributes()->type) {
case 'pre-serialize':
$metadata->addPreSerializeMethod(new MethodMetadata($name, (string) $method->attributes()->name));
$metadata->addPreSerializeMethod(new MethodMetadata($class->name, (string) $method->attributes()->name));
break;

case 'post-serialize':
$metadata->addPostSerializeMethod(new MethodMetadata($name, (string) $method->attributes()->name));
$metadata->addPostSerializeMethod(new MethodMetadata($class->name, (string) $method->attributes()->name));
break;

case 'post-deserialize':
$metadata->addPostDeserializeMethod(new MethodMetadata($name, (string) $method->attributes()->name));
$metadata->addPostDeserializeMethod(new MethodMetadata($class->name, (string) $method->attributes()->name));
break;

case 'handler':
Expand Down

0 comments on commit 62c15a9

Please sign in to comment.