BurningFlipside /
CommonCode
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | namespace Email\Route; |
||
| 3 | |||
| 4 | /** |
||
| 5 | * An class to represent an Email Router |
||
| 6 | */ |
||
| 7 | class SimpleAlias extends Route |
||
| 8 | { |
||
| 9 | public function route($destination, $message) |
||
| 10 | { |
||
| 11 | $alias = $this->data['aliasTo']; |
||
|
0 ignored issues
–
show
|
|||
| 12 | return false; |
||
| 13 | } |
||
| 14 | } |
||
| 15 | /* vim: set tabstop=4 shiftwidth=4 expandtab: */ |
||
| 16 | ?> |
||
|
0 ignored issues
–
show
It is not recommended to use PHP's closing tag
?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore. A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever. Loading history...
|
|||
| 17 |
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.