@@ -28,11 +28,9 @@ public function __construct(string $name, OptionsResolver $resolver)
28
28
/**
29
29
* Adds allowed types for this option.
30
30
*
31
- * @return $this
32
- *
33
31
* @throws AccessException If called from a lazy option or normalizer
34
32
*/
35
- public function allowedTypes (string ...$ types ): self
33
+ public function allowedTypes (string ...$ types ): static
36
34
{
37
35
$ this ->resolver ->setAllowedTypes ($ this ->name , $ types );
38
36
@@ -44,11 +42,9 @@ public function allowedTypes(string ...$types): self
44
42
*
45
43
* @param mixed ...$values One or more acceptable values/closures
46
44
*
47
- * @return $this
48
- *
49
45
* @throws AccessException If called from a lazy option or normalizer
50
46
*/
51
- public function allowedValues (mixed ...$ values ): self
47
+ public function allowedValues (mixed ...$ values ): static
52
48
{
53
49
$ this ->resolver ->setAllowedValues ($ this ->name , $ values );
54
50
@@ -58,11 +54,9 @@ public function allowedValues(mixed ...$values): self
58
54
/**
59
55
* Sets the default value for this option.
60
56
*
61
- * @return $this
62
- *
63
57
* @throws AccessException If called from a lazy option or normalizer
64
58
*/
65
- public function default (mixed $ value ): self
59
+ public function default (mixed $ value ): static
66
60
{
67
61
$ this ->resolver ->setDefault ($ this ->name , $ value );
68
62
@@ -83,10 +77,8 @@ public function define(string $option): self
83
77
* @param string $package The name of the composer package that is triggering the deprecation
84
78
* @param string $version The version of the package that introduced the deprecation
85
79
* @param string|\Closure $message The deprecation message to use
86
- *
87
- * @return $this
88
80
*/
89
- public function deprecated (string $ package , string $ version , string |\Closure $ message = 'The option "%name%" is deprecated. ' ): self
81
+ public function deprecated (string $ package , string $ version , string |\Closure $ message = 'The option "%name%" is deprecated. ' ): static
90
82
{
91
83
$ this ->resolver ->setDeprecated ($ this ->name , $ package , $ version , $ message );
92
84
@@ -96,11 +88,9 @@ public function deprecated(string $package, string $version, string|\Closure $me
96
88
/**
97
89
* Sets the normalizer for this option.
98
90
*
99
- * @return $this
100
- *
101
91
* @throws AccessException If called from a lazy option or normalizer
102
92
*/
103
- public function normalize (\Closure $ normalizer ): self
93
+ public function normalize (\Closure $ normalizer ): static
104
94
{
105
95
$ this ->resolver ->setNormalizer ($ this ->name , $ normalizer );
106
96
@@ -110,11 +100,9 @@ public function normalize(\Closure $normalizer): self
110
100
/**
111
101
* Marks this option as required.
112
102
*
113
- * @return $this
114
- *
115
103
* @throws AccessException If called from a lazy option or normalizer
116
104
*/
117
- public function required (): self
105
+ public function required (): static
118
106
{
119
107
$ this ->resolver ->setRequired ($ this ->name );
120
108
@@ -124,11 +112,9 @@ public function required(): self
124
112
/**
125
113
* Sets an info message for an option.
126
114
*
127
- * @return $this
128
- *
129
115
* @throws AccessException If called from a lazy option or normalizer
130
116
*/
131
- public function info (string $ info ): self
117
+ public function info (string $ info ): static
132
118
{
133
119
$ this ->resolver ->setInfo ($ this ->name , $ info );
134
120
0 commit comments