| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 1 | protected function doExecute(ProfileContext $context) |
|
| 28 | { |
||
| 29 | 1 | $logoutRequest = MessageContextHelper::asLogoutRequest($context->getOutboundContext()); |
|
|
|
|||
| 30 | 1 | $ssoSessionState = $context->getLogoutSsoSessionState(); |
|
| 31 | |||
| 32 | 1 | $nameId = new NameID(); |
|
| 33 | 1 | $nameId->setValue($ssoSessionState->getNameId()); |
|
| 34 | 1 | $nameId->setFormat($ssoSessionState->getNameIdFormat()); |
|
| 35 | |||
| 36 | 1 | $logoutRequest->setNameID($nameId); |
|
| 37 | 1 | } |
|
| 38 | } |
||
| 39 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: