@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | // when both paths have nothing in common, one of them is probably |
41 | 41 | // absolute while the other is relative |
42 | 42 | $root = $root ?: getcwd(); |
43 | - $from = strpos($from, $root) === 0 ? $from : preg_replace('/\/+/', '/', $root . '/' . $from); |
|
44 | - $to = strpos($to, $root) === 0 ? $to : preg_replace('/\/+/', '/', $root . '/' . $to); |
|
43 | + $from = strpos($from, $root) === 0 ? $from : preg_replace('/\/+/', '/', $root.'/'.$from); |
|
44 | + $to = strpos($to, $root) === 0 ? $to : preg_replace('/\/+/', '/', $root.'/'.$to); |
|
45 | 45 | |
46 | 46 | // or traveling the tree via `..` |
47 | 47 | // attempt to resolve path, or assume it's fine if it doesn't exist |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | // normalize paths |
159 | - $path = $this->normalize($this->from . '/' . $path); |
|
159 | + $path = $this->normalize($this->from.'/'.$path); |
|
160 | 160 | |
161 | 161 | // strip shared ancestor paths |
162 | 162 | $shared = $this->shared($path, $this->to); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | // add .. for every directory that needs to be traversed to new path |
167 | 167 | $to = str_repeat('../', count(array_filter(explode('/', $to)))); |
168 | 168 | |
169 | - return $to . ltrim($path, '/'); |
|
169 | + return $to.ltrim($path, '/'); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | /** |