chrisyue /
php-m3u8
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Chrisyue\PhpM3u8\M3u8; |
||
| 4 | |||
| 5 | /** |
||
| 6 | * @Annotation |
||
| 7 | * @Target("PROPERTY") |
||
| 8 | */ |
||
| 9 | class StreamInf extends Tag |
||
| 10 | { |
||
| 11 | public function parse() |
||
| 12 | { |
||
| 13 | parent::parse(); |
||
| 14 | |||
| 15 | if (null !== $this->getResult()) { |
||
| 16 | $this->getStream()->next(); |
||
| 17 | $lineInfo = $this->getStream()->read(); |
||
|
0 ignored issues
–
show
|
|||
| 18 | // $this->getResult()->uri = $lineInfo['value']; |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
63% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. Loading history...
|
|||
| 19 | } |
||
| 20 | |||
| 21 | return $this; |
||
| 22 | } |
||
| 23 | } |
||
| 24 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.