| Conditions | 4 |
| Paths | 6 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | public function getRaw() |
||
| 55 | { |
||
| 56 | $command = strtoupper($this->getCommand()); |
||
| 57 | |||
| 58 | if ($prefix = $this->getPrefix()) { |
||
| 59 | $raw = ":{$prefix} {$command}"; |
||
| 60 | } else { |
||
| 61 | $raw = $this->getCommand(); |
||
| 62 | } |
||
| 63 | |||
| 64 | if ($params = $this->getParams()) { |
||
| 65 | $last = array_pop($params); |
||
| 66 | |||
| 67 | $param_string = implode(' ', $params); |
||
| 68 | if ($param_string) { |
||
| 69 | $raw .= " {$param_string}"; |
||
| 70 | } |
||
| 71 | $raw .= " :{$last}"; |
||
| 72 | } |
||
| 73 | |||
| 74 | return $raw; |
||
| 75 | } |
||
| 76 | |||
| 111 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.