Conditions | 3 |
Paths | 1 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
32 | public function handle(ScrutinizerCommand $command): PromiseInterface |
||
33 | { |
||
34 | return $this->scrutinizer->repository( |
||
35 | $command->getLogin(), |
||
36 | $command->getName() |
||
37 | )->then(null, function ($throwable) { |
||
38 | if (!($throwable instanceof ResponseException)) { |
||
39 | return reject($throwable); |
||
40 | } |
||
41 | |||
42 | if ($throwable->getCode() !== 404) { |
||
43 | return reject($throwable); |
||
44 | } |
||
45 | |||
46 | return resolve(false); |
||
47 | }); |
||
48 | } |
||
49 | } |
||
50 |