Skip to content

Commit

Permalink
last improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto committed Oct 19, 2023
1 parent 4851495 commit 6c6a9a4
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,25 @@

namespace Symfony\Component\Validator\Constraints;

use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Symfony\Component\Validator\Attribute\HasNamedArguments;

/**
* Attribute to define a group sequence provider.
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target({"CLASS", "ANNOTATION"})
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class GroupSequenceProvider
{
public ?string $provider = null;

public function __construct(array $options = [], string $provider = null)
#[HasNamedArguments]
public function __construct(public ?string $provider = null)
{
$this->provider = $options['provider'] ?? $provider;
}
}

0 comments on commit 6c6a9a4

Please sign in to comment.