Conditions | 3 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
35 | public function getContents($originUrl, $fileUrl, $progress = true, $options = array()) |
||
36 | { |
||
37 | $res = null; |
||
38 | try { |
||
39 | $this->req = new FetchRequest($fileUrl, $this->io, $this->config); |
||
40 | $res = $this->req->fetch(); |
||
41 | } catch (\Exception $e) { |
||
42 | $this->io->writeError((string)$e); |
||
43 | } |
||
44 | if ($res) { |
||
45 | return $res; |
||
46 | } else { |
||
47 | return parent::getContents($originUrl, $fileUrl, $progress, $options); |
||
48 | } |
||
49 | } |
||
50 | |||
65 |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.