1 | <?php |
||
20 | class OptionsResolver |
||
21 | { |
||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | private $required = array(); |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $defaults = array(); |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | private $allowedValues = array(); |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | private $allowedTypes = array(); |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | private $normalizers = array(); |
||
46 | |||
47 | /** |
||
48 | * @param string $option |
||
49 | * @param mixed $value |
||
50 | */ |
||
51 | public function setDefault($option, $value) |
||
55 | |||
56 | /** |
||
57 | * @param array $options |
||
58 | */ |
||
59 | public function setRequired(array $options) |
||
63 | |||
64 | /** |
||
65 | * @param string $option |
||
66 | * @param mixed[] $values |
||
67 | * |
||
68 | * @return $this |
||
69 | */ |
||
70 | public function setAllowedValues($option, array $values) |
||
76 | |||
77 | /** |
||
78 | * @param string $option |
||
79 | * @param mixed[] $types |
||
80 | * |
||
81 | * @return $this |
||
82 | */ |
||
83 | public function setAllowedTypes($option, array $types) |
||
89 | |||
90 | /** |
||
91 | * @param string $option |
||
92 | * @param \Closure $normalizer |
||
93 | * |
||
94 | * @return $this |
||
95 | */ |
||
96 | public function setNormalizer($option, \Closure $normalizer) |
||
102 | |||
103 | /** |
||
104 | * @param array $options |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | public function resolve(array $options) |
||
122 | |||
123 | /** |
||
124 | * @param BaseOptionsResolver $resolver |
||
125 | */ |
||
126 | private function setupResolver(BaseOptionsResolver $resolver) |
||
140 | |||
141 | /** |
||
142 | * @param BaseOptionsResolver $resolver |
||
143 | */ |
||
144 | private function setupResolverLegacy(BaseOptionsResolver $resolver) |
||
150 | } |
This check looks for function calls that miss required arguments.