Skip to content

Commit 71ac834

Browse files
fix(theme): prevent parent to stay string
1 parent 5a07248 commit 71ac834

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Theme.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Theme
4949
/**
5050
* The Parent theme.
5151
*/
52-
protected string | Theme | null $parent;
52+
protected string|Theme|null $parent = null;
5353

5454
/**
5555
* The theme statud (enabled or not).
@@ -219,7 +219,7 @@ public function hasParent(): bool
219219
/**
220220
* Set parent Theme.
221221
*/
222-
public function setParent(string | Theme | null $theme): self
222+
public function setParent(string|Theme|null $theme): self
223223
{
224224
$this->parent = empty($theme) ? null : $theme;
225225

@@ -229,9 +229,9 @@ public function setParent(string | Theme | null $theme): self
229229
/**
230230
* Get parent Theme.
231231
*/
232-
public function getParent(): Theme | null
232+
public function getParent(): Theme|null
233233
{
234-
if (is_string($this->parent) && !empty($this->parent)) {
234+
if (is_string($this->parent)) {
235235
$this->parent = ThemesManager::findByName($this->parent);
236236
}
237237

@@ -359,7 +359,7 @@ public function url(string $url, bool $absolute = true): string
359359
/**
360360
* List theme's available layouts.
361361
*
362-
* @return Collection
362+
* @return \Illuminate\Support\Collection
363363
*/
364364
public function listLayouts()
365365
{

0 commit comments

Comments
 (0)