| @@ 18-27 (lines=10) @@ | ||
| 15 | /** |
|
| 16 | * @return array |
|
| 17 | */ |
|
| 18 | public function builds(): array |
|
| 19 | { |
|
| 20 | return $this->wait( |
|
| 21 | $this->handleCommand( |
|
| 22 | new BuildAsyncFromSyncCommand(self::HYDRATE_CLASS, $this) |
|
| 23 | )->then(function (RepositoryInterface $repository) { |
|
| 24 | return Promise::fromObservable($repository->builds()->toArray()); |
|
| 25 | }) |
|
| 26 | ); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @param int $id |
|
| @@ 47-56 (lines=10) @@ | ||
| 44 | /** |
|
| 45 | * @return array |
|
| 46 | */ |
|
| 47 | public function commits(): array |
|
| 48 | { |
|
| 49 | return $this->wait( |
|
| 50 | $this->handleCommand( |
|
| 51 | new BuildAsyncFromSyncCommand(self::HYDRATE_CLASS, $this) |
|
| 52 | )->then(function (RepositoryInterface $repository) { |
|
| 53 | return Promise::fromObservable($repository->commits()->toArray()); |
|
| 54 | }) |
|
| 55 | ); |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * @return SettingsInterface |
|
| @@ 119-128 (lines=10) @@ | ||
| 116 | /** |
|
| 117 | * @return array |
|
| 118 | */ |
|
| 119 | public function branches(): array |
|
| 120 | { |
|
| 121 | return $this->wait( |
|
| 122 | $this->handleCommand( |
|
| 123 | new BuildAsyncFromSyncCommand(self::HYDRATE_CLASS, $this) |
|
| 124 | )->then(function (RepositoryInterface $repository) { |
|
| 125 | return Promise::fromObservable($repository->branches()->toArray()); |
|
| 126 | }) |
|
| 127 | ); |
|
| 128 | } |
|
| 129 | ||
| 130 | /** |
|
| 131 | * @return array |
|
| @@ 133-142 (lines=10) @@ | ||
| 130 | /** |
|
| 131 | * @return array |
|
| 132 | */ |
|
| 133 | public function vars(): array |
|
| 134 | { |
|
| 135 | return $this->wait( |
|
| 136 | $this->handleCommand( |
|
| 137 | new BuildAsyncFromSyncCommand(self::HYDRATE_CLASS, $this) |
|
| 138 | )->then(function (RepositoryInterface $repository) { |
|
| 139 | return Promise::fromObservable($repository->vars()->toArray()); |
|
| 140 | }) |
|
| 141 | ); |
|
| 142 | } |
|
| 143 | ||
| 144 | /** |
|
| 145 | * @return array |
|
| @@ 147-156 (lines=10) @@ | ||
| 144 | /** |
|
| 145 | * @return array |
|
| 146 | */ |
|
| 147 | public function caches(): array |
|
| 148 | { |
|
| 149 | return $this->wait( |
|
| 150 | $this->handleCommand( |
|
| 151 | new BuildAsyncFromSyncCommand(self::HYDRATE_CLASS, $this) |
|
| 152 | )->then(function (RepositoryInterface $repository) { |
|
| 153 | return Promise::fromObservable($repository->caches()->toArray()); |
|
| 154 | }) |
|
| 155 | ); |
|
| 156 | } |
|
| 157 | ||
| 158 | /** |
|
| 159 | * @return RepositoryKeyInterface |
|