Skip to content

Commit 64bfdfd

Browse files
authored
Minor refactoring Theme class (#169)
1 parent 808cacc commit 64bfdfd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/Theme.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ final class Theme
7171
* @var array<string, string|string[]>
7272
*/
7373
private array $pathMap;
74-
private string $basePath;
74+
private string $basePath = '';
7575
private string $baseUrl = '';
7676

7777
/**
@@ -84,7 +84,10 @@ public function __construct(array $pathMap = [], string $basePath = '', string $
8484
{
8585
$this->validatePathMap($pathMap);
8686
$this->pathMap = $pathMap;
87-
$this->basePath = rtrim($basePath, '/');
87+
88+
if ($basePath !== '') {
89+
$this->basePath = rtrim($basePath, '/');
90+
}
8891

8992
if ($baseUrl !== '') {
9093
$this->baseUrl = rtrim($baseUrl, '/');

0 commit comments

Comments
 (0)