| Conditions | 5 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | public function identityAnalyzer($identity) |
||
| 39 | { |
||
| 40 | $result = $this->getHttpClient($this->apiKey)->post( |
||
| 41 | "{$this->baseUrl}/session", |
||
| 42 | array( |
||
| 43 | 'address' => $identity->getAddress()->getValue(), |
||
| 44 | 'headers' => $identity->getHeaders(), |
||
| 45 | ) |
||
| 46 | ); |
||
| 47 | |||
| 48 | if (isset($result['identity']) && is_array($result['identity'])) { |
||
| 49 | $identity->setAttributes($result['identity']); |
||
| 50 | } |
||
| 51 | |||
| 52 | if (isset($result['session']) && is_array($result['session'])) { |
||
| 53 | $identity->setAttribute('session', $result['session']); |
||
| 54 | } |
||
| 55 | |||
| 56 | return $identity; |
||
| 57 | } |
||
| 58 | |||
| 60 |