Skip to content

Commit 6c6a9a4

Browse files
committed
last improvements
1 parent 4851495 commit 6c6a9a4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,25 @@
1111

1212
namespace Symfony\Component\Validator\Constraints;
1313

14+
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
15+
use Symfony\Component\Validator\Attribute\HasNamedArguments;
16+
1417
/**
1518
* Attribute to define a group sequence provider.
1619
*
1720
* @Annotation
1821
*
22+
* @NamedArgumentConstructor
23+
*
1924
* @Target({"CLASS", "ANNOTATION"})
2025
*
2126
* @author Bernhard Schussek <bschussek@gmail.com>
2227
*/
2328
#[\Attribute(\Attribute::TARGET_CLASS)]
2429
class GroupSequenceProvider
2530
{
26-
public ?string $provider = null;
27-
28-
public function __construct(array $options = [], string $provider = null)
31+
#[HasNamedArguments]
32+
public function __construct(public ?string $provider = null)
2933
{
30-
$this->provider = $options['provider'] ?? $provider;
3134
}
3235
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy