Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace Termwind\Exceptions;
6
 
7
use InvalidArgumentException;
8
 
9
/**
10
 * @internal
11
 */
12
final class StyleNotFound extends InvalidArgumentException
13
{
14
    /**
15
     * Creates a new style not found instance.
16
     */
17
    private function __construct(string $message)
18
    {
19
        parent::__construct($message, 0, $this->getPrevious());
20
    }
21
 
22
    /**
23
     * Creates a new style not found instance from the given style.
24
     */
25
    public static function fromStyle(string $style): self
26
    {
27
        return new self(sprintf('Style [%s] not found.', $style));
28
    }
29
}