Skip to content

Commit 19ffa38

Browse files
committed
Remove ReturnTypeWillChange
Signed-off-by: Alexander M. Turek <[email protected]>
1 parent 61084cb commit 19ffa38

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

OptionsResolver.php

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -914,8 +914,6 @@ public function resolve(array $options = [])
914914
*
915915
* @param bool $triggerDeprecation Whether to trigger the deprecation or not (true by default)
916916
*
917-
* @return mixed The option value
918-
*
919917
* @throws AccessException If accessing this method outside of
920918
* {@link resolve()}
921919
* @throws NoSuchOptionException If the option is not set
@@ -924,8 +922,7 @@ public function resolve(array $options = [])
924922
* @throws OptionDefinitionException If there is a cyclic dependency between
925923
* lazy options and/or normalizers
926924
*/
927-
#[\ReturnTypeWillChange]
928-
public function offsetGet(mixed $option, bool $triggerDeprecation = true)
925+
public function offsetGet(mixed $option, bool $triggerDeprecation = true): mixed
929926
{
930927
if (!$this->locked) {
931928
throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
@@ -1174,14 +1171,11 @@ private function verifyTypes(string $type, mixed $value, array &$invalidTypes, i
11741171
/**
11751172
* Returns whether a resolved option with the given name exists.
11761173
*
1177-
* @return bool Whether the option is set
1178-
*
11791174
* @throws AccessException If accessing this method outside of {@link resolve()}
11801175
*
11811176
* @see \ArrayAccess::offsetExists()
11821177
*/
1183-
#[\ReturnTypeWillChange]
1184-
public function offsetExists(mixed $option)
1178+
public function offsetExists(mixed $option): bool
11851179
{
11861180
if (!$this->locked) {
11871181
throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
@@ -1193,25 +1187,19 @@ public function offsetExists(mixed $option)
11931187
/**
11941188
* Not supported.
11951189
*
1196-
* @return void
1197-
*
11981190
* @throws AccessException
11991191
*/
1200-
#[\ReturnTypeWillChange]
1201-
public function offsetSet(mixed $option, mixed $value)
1192+
public function offsetSet(mixed $option, mixed $value): void
12021193
{
12031194
throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.');
12041195
}
12051196

12061197
/**
12071198
* Not supported.
12081199
*
1209-
* @return void
1210-
*
12111200
* @throws AccessException
12121201
*/
1213-
#[\ReturnTypeWillChange]
1214-
public function offsetUnset(mixed $option)
1202+
public function offsetUnset(mixed $option): void
12151203
{
12161204
throw new AccessException('Removing options via array access is not supported. Use remove() instead.');
12171205
}
@@ -1221,14 +1209,11 @@ public function offsetUnset(mixed $option)
12211209
*
12221210
* This may be only a subset of the defined options.
12231211
*
1224-
* @return int Number of options
1225-
*
12261212
* @throws AccessException If accessing this method outside of {@link resolve()}
12271213
*
12281214
* @see \Countable::count()
12291215
*/
1230-
#[\ReturnTypeWillChange]
1231-
public function count()
1216+
public function count(): int
12321217
{
12331218
if (!$this->locked) {
12341219
throw new AccessException('Counting is only supported within closures of lazy options and normalizers.');

0 commit comments

Comments
 (0)