| Conditions | 4 |
| Paths | 8 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | public function __toString() |
||
| 51 | { |
||
| 52 | $attributes = array(); |
||
| 53 | foreach ($this->attributes as $value) { |
||
| 54 | $attributes[] = (string)$value; |
||
| 55 | } |
||
| 56 | $attributes = implode("\n", $attributes); |
||
| 57 | |||
| 58 | $from_name = addslashes($this->getFrom()->getName()); |
||
| 59 | $to_name = addslashes($this->getTo()->getName()); |
||
| 60 | $from_name .= (!empty($this->fromPort)) ? ':' . $this->fromPort : ''; |
||
| 61 | $to_name .= (!empty($this->toPort)) ? ':' . $this->toPort : ''; |
||
| 62 | |||
| 63 | return <<<DOT |
||
| 64 | $from_name -> $to_name [ |
||
| 65 | $attributes |
||
| 66 | ] |
||
| 69 | } |