1 | <?php |
||
25 | final class ParametersParser implements ParametersParserInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var ContainerInterface |
||
29 | */ |
||
30 | private $container; |
||
31 | |||
32 | /** |
||
33 | * @var ExpressionLanguage |
||
34 | */ |
||
35 | private $expression; |
||
36 | |||
37 | /** |
||
38 | * @param ContainerInterface $container |
||
39 | * @param ExpressionLanguage $expression |
||
40 | */ |
||
41 | public function __construct(ContainerInterface $container, ExpressionLanguage $expression) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function parseRequestValues(array $parameters, Request $request): array |
||
60 | |||
61 | /** |
||
62 | * @param mixed $parameter |
||
63 | * @param Request $request |
||
64 | * |
||
65 | * @return mixed |
||
66 | */ |
||
67 | private function parseRequestValue($parameter, Request $request) |
||
93 | |||
94 | /** |
||
95 | * @param string $expression |
||
96 | * @param Request $request |
||
97 | * |
||
98 | * @return string |
||
|
|||
99 | */ |
||
100 | private function parseRequestValueExpression(string $expression, Request $request) |
||
118 | } |
||
119 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.If the return type contains the type array, this check recommends the use of a more specific type like
String[]
orarray<String>
.