Skip to content

Commit

Permalink
use string instead of constant (#2174)
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Jan 3, 2024
1 parent bef8b65 commit ed742a7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Model/Model.php
Expand Up @@ -12,7 +12,6 @@
namespace Nelmio\ApiDocBundle\Model;

use Symfony\Component\PropertyInfo\Type;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;

final class Model
{
Expand All @@ -30,7 +29,7 @@ public function __construct(Type $type, array $groups = null, array $options = n
$this->options = $options;
$this->serializationContext = $serializationContext;
if (null !== $groups) {
$this->serializationContext[AbstractNormalizer::GROUPS] = $groups;
$this->serializationContext['groups'] = $groups;
}
}

Expand All @@ -47,7 +46,7 @@ public function getType()
*/
public function getGroups()
{
return $this->serializationContext[AbstractNormalizer::GROUPS] ?? null;
return $this->serializationContext['groups'] ?? null;
}

/**
Expand Down

0 comments on commit ed742a7

Please sign in to comment.