Conditions | 5 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function apply(Request $request, bool $normalization, array $attributes, array &$context) |
||
40 | { |
||
41 | if (!is_array($properties = $request->query->get($this->parameterName))) { |
||
42 | return; |
||
43 | } |
||
44 | |||
45 | if (null !== $this->whitelist) { |
||
46 | $properties = array_intersect_key($this->whitelist, $properties); |
||
47 | } |
||
48 | |||
49 | if (!$this->overrideDefaultProperties && isset($context['attributes'])) { |
||
50 | $properties = array_merge_recursive((array) $context['attributes'], $properties); |
||
51 | } |
||
52 | |||
53 | $context['attributes'] = $properties; |
||
54 | } |
||
55 | |||
70 |