New Branch Structure
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Stylist\Theme\Exceptions;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
final class InvalidThemeManifestException extends RuntimeException
|
||||
{
|
||||
/** @param array<int, string> $errors */
|
||||
public static function forPath(string $path, array $errors): self
|
||||
{
|
||||
return new self(sprintf(
|
||||
'Invalid theme manifest at [%s]: %s',
|
||||
rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'theme.json',
|
||||
implode(' ', $errors),
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Stylist\Theme\Exceptions;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
final class ThemeJsonNotFoundException extends RuntimeException
|
||||
{
|
||||
public static function forPath(string $path): self
|
||||
{
|
||||
return new self("Theme manifest [{$path}/theme.json] was not found.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Stylist\Theme\Exceptions;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
final class ThemeNotFoundException extends RuntimeException
|
||||
{
|
||||
public static function forKey(string $key): self
|
||||
{
|
||||
return new self("Theme [{$key}] was not found.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user