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