1 | <?php |
||
22 | final class OptionsParser implements OptionsParserInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var ContainerInterface |
||
26 | */ |
||
27 | private $container; |
||
28 | |||
29 | /** |
||
30 | * @var ExpressionLanguage |
||
31 | */ |
||
32 | private $expression; |
||
33 | |||
34 | /** |
||
35 | * @var PropertyAccessorInterface |
||
36 | */ |
||
37 | private $propertyAccessor; |
||
38 | |||
39 | /** |
||
40 | * @param ContainerInterface $container |
||
41 | * @param ExpressionLanguage $expression |
||
42 | * @param PropertyAccessorInterface $propertyAccessor |
||
43 | */ |
||
44 | public function __construct( |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function parseOptions(array $parameters, Request $request, $data = null) |
||
67 | |||
68 | /** |
||
69 | * @param mixed $parameter |
||
70 | * @param Request $request |
||
71 | * @param mixed $data |
||
72 | * |
||
73 | * @return mixed |
||
74 | */ |
||
75 | private function parseOption($parameter, Request $request, $data) |
||
91 | |||
92 | /** |
||
93 | * @param string $expression |
||
94 | * @param Request $request |
||
95 | * |
||
96 | * @return string |
||
|
|||
97 | */ |
||
98 | private function parseOptionExpression($expression, Request $request) |
||
108 | |||
109 | /** |
||
110 | * @param string $value |
||
111 | * @param mixed $data |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | private function parseOptionResourceField($value, $data) |
||
119 | } |
||
120 |
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>
.