Skip to content

Commit e429bfa

Browse files
wouterjnicolas-grekas
authored andcommitted
[Components] Convert to native return types
1 parent f356e31 commit e429bfa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

OptionsResolver.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ public function isDeprecated(string $option): bool
490490
* @throws UndefinedOptionsException If the option is undefined
491491
* @throws AccessException If called from a lazy option or normalizer
492492
*/
493-
public function setNormalizer(string $option, \Closure $normalizer)
493+
public function setNormalizer(string $option, \Closure $normalizer): static
494494
{
495495
if ($this->locked) {
496496
throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.');
@@ -574,7 +574,7 @@ public function addNormalizer(string $option, \Closure $normalizer, bool $forceP
574574
* @throws UndefinedOptionsException If the option is undefined
575575
* @throws AccessException If called from a lazy option or normalizer
576576
*/
577-
public function setAllowedValues(string $option, mixed $allowedValues)
577+
public function setAllowedValues(string $option, mixed $allowedValues): static
578578
{
579579
if ($this->locked) {
580580
throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.');
@@ -614,7 +614,7 @@ public function setAllowedValues(string $option, mixed $allowedValues)
614614
* @throws UndefinedOptionsException If the option is undefined
615615
* @throws AccessException If called from a lazy option or normalizer
616616
*/
617-
public function addAllowedValues(string $option, mixed $allowedValues)
617+
public function addAllowedValues(string $option, mixed $allowedValues): static
618618
{
619619
if ($this->locked) {
620620
throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.');
@@ -654,7 +654,7 @@ public function addAllowedValues(string $option, mixed $allowedValues)
654654
* @throws UndefinedOptionsException If the option is undefined
655655
* @throws AccessException If called from a lazy option or normalizer
656656
*/
657-
public function setAllowedTypes(string $option, string|array $allowedTypes)
657+
public function setAllowedTypes(string $option, string|array $allowedTypes): static
658658
{
659659
if ($this->locked) {
660660
throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.');
@@ -688,7 +688,7 @@ public function setAllowedTypes(string $option, string|array $allowedTypes)
688688
* @throws UndefinedOptionsException If the option is undefined
689689
* @throws AccessException If called from a lazy option or normalizer
690690
*/
691-
public function addAllowedTypes(string $option, string|array $allowedTypes)
691+
public function addAllowedTypes(string $option, string|array $allowedTypes): static
692692
{
693693
if ($this->locked) {
694694
throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.');

0 commit comments

Comments
 (0)