Skip to content

Commit 6457dd6

Browse files
Remove some visual debt by adding type hints on final methods/classes
1 parent e35137e commit 6457dd6

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

Debug/OptionsResolverIntrospector.php

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,61 +41,49 @@ public function __construct(OptionsResolver $optionsResolver)
4141
}
4242

4343
/**
44-
* @param string $option
45-
*
4644
* @return mixed
4745
*
4846
* @throws NoConfigurationException on no configured value
4947
*/
50-
public function getDefault($option)
48+
public function getDefault(string $option)
5149
{
5250
return call_user_func($this->get, 'defaults', $option, sprintf('No default value was set for the "%s" option.', $option));
5351
}
5452

5553
/**
56-
* @param string $option
57-
*
5854
* @return \Closure[]
5955
*
6056
* @throws NoConfigurationException on no configured closures
6157
*/
62-
public function getLazyClosures($option)
58+
public function getLazyClosures(string $option): array
6359
{
6460
return call_user_func($this->get, 'lazy', $option, sprintf('No lazy closures were set for the "%s" option.', $option));
6561
}
6662

6763
/**
68-
* @param string $option
69-
*
7064
* @return string[]
7165
*
7266
* @throws NoConfigurationException on no configured types
7367
*/
74-
public function getAllowedTypes($option)
68+
public function getAllowedTypes(string $option): array
7569
{
7670
return call_user_func($this->get, 'allowedTypes', $option, sprintf('No allowed types were set for the "%s" option.', $option));
7771
}
7872

7973
/**
80-
* @param string $option
81-
*
8274
* @return mixed[]
8375
*
8476
* @throws NoConfigurationException on no configured values
8577
*/
86-
public function getAllowedValues($option)
78+
public function getAllowedValues(string $option): array
8779
{
8880
return call_user_func($this->get, 'allowedValues', $option, sprintf('No allowed values were set for the "%s" option.', $option));
8981
}
9082

9183
/**
92-
* @param string $option
93-
*
94-
* @return \Closure
95-
*
9684
* @throws NoConfigurationException on no configured normalizer
9785
*/
98-
public function getNormalizer($option)
86+
public function getNormalizer(string $option): \Closure
9987
{
10088
return call_user_func($this->get, 'normalizers', $option, sprintf('No normalizer was set for the "%s" option.', $option));
10189
}

0 commit comments

Comments
 (0)