| 1 | <?php |
||
| 8 | class BangMessage extends Message |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The bang command |
||
| 12 | * e.g. the message "!somersault mouse acrobat" |
||
| 13 | * would return "somersault" as the bang command |
||
| 14 | * |
||
| 15 | * @return string |
||
| 16 | */ |
||
| 17 | public function bangCommand() |
||
| 23 | |||
| 24 | /** |
||
| 25 | * The bang text |
||
| 26 | * e.g. the message "!somersault mouse acrobat" |
||
| 27 | * would return "mouse acrobat" as the bang text |
||
| 28 | * |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | public function bangText() |
||
| 37 | } |
||
| 38 |
This checks looks for assignemnts to variables using the
list(...)function, where not all assigned variables are subsequently used.Consider the following code example.
Only the variables
$aand$care used. There was no need to assign$b.Instead, the list call could have been.