Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4.125 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
55 | 16 | public function getContents() |
|
56 | { |
||
57 | 16 | if ($this->exists() && |
|
58 | 16 | $this->getCompression() != CompressionType::NONE |
|
59 | ) { |
||
60 | $uncompressed = $this->decompress(); |
||
|
|||
61 | $content = $uncompressed->getContents(); |
||
62 | $uncompressed->delete(); |
||
63 | return $content; |
||
64 | } else { |
||
65 | 16 | return parent::getContents(); |
|
66 | } |
||
67 | } |
||
68 | |||
89 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: