Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
96 | public function __toString() |
||
97 | { |
||
98 | if (!$this->isValid()) { |
||
99 | throw new Exception('invalid rsync path'); |
||
100 | } |
||
101 | $return = ''; |
||
102 | if (null !== $this->host) { |
||
103 | // remote user |
||
104 | if (null !== $this->user) { |
||
105 | $return .= $this->user . '@'; |
||
106 | } |
||
107 | $return .= $this->host . ':'; |
||
108 | } |
||
109 | $return .= $this->path; |
||
110 | |||
111 | return $return; |
||
112 | } |
||
113 | } |
||
114 |