| Conditions | 2 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 31 | public function handle(AppVeyorCommand $command): PromiseInterface |
||
| 32 | { |
||
| 33 | return new Promise(function ($resolve, $reject) use ($command) { |
||
| 34 | $repo = false; |
||
| 35 | $this->appveyor->projects()->filter(function (ProjectInterface $project) use ($command) { |
||
| 36 | return $project->repositoryType() === 'github' && |
||
| 37 | $project->repositoryName() === $command->getRepository(); |
||
| 38 | })->take(1)->subscribe(function ($repository) use (&$repo) { |
||
| 39 | $repo = $repository; |
||
| 40 | }, function ($error) use ($reject) { |
||
| 41 | $reject($error); |
||
| 42 | }, function () use (&$repo, $resolve) { |
||
| 43 | $resolve($repo); |
||
| 44 | }); |
||
| 45 | }); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |