Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/ThemeViewFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ class ThemeViewFinder extends FileViewFinder

public function getViewFinder()
{
// It should return `theme.finder` if Laravel's view finder is replaced
// with package's finder.
// return app('theme.finder');

return app('view')->getFinder();
}

public function setActiveTheme(string $theme, string $parentTheme = null): void
public function setActiveTheme(string $theme, ?string $parentTheme): void
{
if ($theme) {
$this->clearThemes();
Expand All @@ -48,7 +44,7 @@ public function setHints($hints): void
$this->hints = $hints;
}

public function getThemePath(string $theme, string $path = null): string
public function getThemePath(string $theme, ?string $path): string
{
if (! config('theme.base_path')) {
throw new ThemeBasePathNotDefined();
Expand All @@ -59,7 +55,7 @@ public function getThemePath(string $theme, string $path = null): string
);
}

public function getThemeViewPath(string $theme = null): string
public function getThemeViewPath(?string $theme): string
{
$theme = $theme ?? $this->getActiveTheme();

Expand Down Expand Up @@ -109,8 +105,6 @@ public function clearThemes(): void

public function registerTheme(string $theme): void
{
// array_unshift($this->paths, $this->getThemeViewPath($theme));

$this->getViewFinder()->prependLocation($this->getThemeViewPath($theme));

$this->registerNameSpacesForTheme($theme);
Expand Down