Conditions | 4 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 5.5021 |
Changes | 0 |
1 | <?php |
||
26 | 6 | private static function configureContext(Context $jmsContext, array $context = null) |
|
27 | { |
||
28 | 6 | $jmsContext->setSerializeNull(true); |
|
29 | |||
30 | 6 | if (null === $context) { |
|
31 | return $jmsContext; |
||
32 | } |
||
33 | |||
34 | 6 | if (array_key_exists('groups', $context)) { |
|
35 | $jmsContext->setGroups($context['groups']); |
||
36 | } |
||
37 | |||
38 | 6 | if (array_key_exists('object_to_populate', $context)) { |
|
39 | $jmsContext->setAttribute('target', $context['object_to_populate']); |
||
40 | } |
||
41 | |||
42 | 6 | return $jmsContext; |
|
43 | } |
||
44 | } |
||
45 |