| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 7 | public function accounts() |
|
| 19 | { |
||
| 20 | // First, establish your profile ID |
||
| 21 | 7 | $user = $this->myself(); |
|
| 22 | |||
| 23 | // Second, retrieve for the accounts for this member |
||
| 24 | 1 | $accounts = $this->request( |
|
|
|
|||
| 25 | 1 | 'GET', |
|
| 26 | 1 | 'https://app.vssps.visualstudio.com/_apis/accounts', |
|
| 27 | 1 | ['query' => ['memberId' => $user->id]] |
|
| 28 | 1 | ); |
|
| 29 | |||
| 30 | 1 | if ($accounts === '[]') { |
|
| 31 | return []; |
||
| 32 | } |
||
| 33 | |||
| 34 | return $this->fromDevOpsAccounts($accounts); |
||
| 35 | } |
||
| 49 |