| @@ 71-80 (lines=10) @@ | ||
| 68 | * |
|
| 69 | * @throws \Github\Exception\InvalidArgumentException |
|
| 70 | */ |
|
| 71 | private function getApi($name) |
|
| 72 | { |
|
| 73 | $this->assureAuthenticated(); |
|
| 74 | ||
| 75 | if ($this->hasKey($this->apiCollection, $name) === false) { |
|
| 76 | $this->apiCollection[$name] = $this->client->api($name); |
|
| 77 | } |
|
| 78 | ||
| 79 | return $this->apiCollection[$name]; |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * @param $name |
|
| @@ 87-93 (lines=7) @@ | ||
| 84 | * @param $api |
|
| 85 | * @return ApiInterface |
|
| 86 | */ |
|
| 87 | private function getApiFrom($name, $api) |
|
| 88 | { |
|
| 89 | if ($this->hasKey($this->apiCollection, $name) === false) { |
|
| 90 | $this->apiCollection[$name] = $api->{$name}(); |
|
| 91 | } |
|
| 92 | return $this->apiCollection[$name]; |
|
| 93 | } |
|
| 94 | ||
| 95 | /** |
|
| 96 | * @return \Github\Api\Repository\Commits |
|