| Total Complexity | 2 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | trait ManagesProjects |
||
| 9 | { |
||
| 10 | use TransformsProjects; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Get a single project. |
||
| 14 | * |
||
| 15 | * @param string $id |
||
| 16 | * |
||
| 17 | * @throws \TestMonitor\DevOps\Exceptions\InvalidDataException |
||
| 18 | 11 | * |
|
| 19 | * @return \TestMonitor\DevOps\Resources\Project |
||
| 20 | 11 | */ |
|
| 21 | public function project(string $id): Project |
||
| 22 | 1 | { |
|
| 23 | $response = $this->get("_apis/projects/{$id}"); |
||
|
|
|||
| 24 | |||
| 25 | return $this->fromDevOpsProject($response); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get a list of of projects. |
||
| 30 | * |
||
| 31 | * @throws \TestMonitor\DevOps\Exceptions\InvalidDataException |
||
| 32 | * |
||
| 33 | * @return \TestMonitor\DevOps\Resources\Project[] |
||
| 34 | */ |
||
| 35 | public function projects() |
||
| 40 | } |
||
| 41 | } |
||
| 42 |