Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
51 | 7 | private function after(HttpGetResponse $res) |
|
52 | { |
||
53 | 7 | if (CURLE_OK !== $res->errno) { |
|
54 | 1 | throw new Downloader\TransportException("$res->error:$res->errno"); |
|
55 | } |
||
56 | |||
57 | 6 | if (in_array($res->info['http_code'], array(401, 403, 404))) { |
|
58 | 4 | $res->setNeedAuth(); |
|
59 | 4 | return; |
|
60 | } |
||
61 | 3 | } |
|
62 | } |
||
63 |