Conditions | 4 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5.5726 |
Changes | 0 |
1 | <?php |
||
34 | 13 | private static function configureContext(Context $jmsContext, array $context = null) |
|
35 | { |
||
36 | 13 | $jmsContext->setSerializeNull(true); |
|
37 | |||
38 | 13 | if (null === $context) { |
|
39 | return; |
||
40 | } |
||
41 | |||
42 | 13 | if (array_key_exists('groups', $context)) { |
|
43 | $jmsContext->setGroups($context['groups']); |
||
44 | } |
||
45 | |||
46 | 13 | if (array_key_exists('object_to_populate', $context)) { |
|
47 | 2 | $jmsContext->setAttribute('target', $context['object_to_populate']); |
|
48 | } |
||
49 | 13 | } |
|
50 | } |
||
51 |