Skip to content

Commit 4195a64

Browse files
committed
formatting
1 parent a99374c commit 4195a64

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/Illuminate/View/FileViewFinder.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class FileViewFinder implements ViewFinderInterface
5353
public function __construct(Filesystem $files, array $paths, array $extensions = null)
5454
{
5555
$this->files = $files;
56-
$this->paths = array_map([$this, 'normalizePath'], $paths);
56+
$this->paths = array_map([$this, 'resolvePath'], $paths);
5757

5858
if (isset($extensions)) {
5959
$this->extensions = $extensions;
@@ -158,7 +158,7 @@ protected function getPossibleViewFiles($name)
158158
*/
159159
public function addLocation($location)
160160
{
161-
$this->paths[] = $this->normalizePath($location);
161+
$this->paths[] = $this->resolvePath($location);
162162
}
163163

164164
/**
@@ -169,7 +169,18 @@ public function addLocation($location)
169169
*/
170170
public function prependLocation($location)
171171
{
172-
array_unshift($this->paths, $this->normalizePath($location));
172+
array_unshift($this->paths, $this->resolvePath($location));
173+
}
174+
175+
/**
176+
* Resolve the path.
177+
*
178+
* @param string $path
179+
* @return string
180+
*/
181+
protected function resolvePath($path)
182+
{
183+
return realpath($path) ?: $path;
173184
}
174185

175186
/**
@@ -295,15 +306,4 @@ public function getExtensions()
295306
{
296307
return $this->extensions;
297308
}
298-
299-
/**
300-
* Replace unnecessary relative fragments from the absolute view path.
301-
*
302-
* @param string $path
303-
* @return string
304-
*/
305-
protected function normalizePath($path)
306-
{
307-
return realpath($path) ?: $path;
308-
}
309309
}

0 commit comments

Comments
 (0)