chore: complete update
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\DateTime\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidDateTimeException extends Exception
|
||||
{
|
||||
public function __construct(string $dateTime, ?string $format = null, ?\Throwable $previous = null)
|
||||
{
|
||||
$message = $format !== null
|
||||
? sprintf('Konnte DateTime nicht aus "%s" mit Format "%s" erstellen', $dateTime, $format)
|
||||
: sprintf('Ungültiges DateTime-Format: "%s"', $dateTime);
|
||||
|
||||
parent::__construct($message, 0, $previous);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\DateTime\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidTimezoneException extends Exception
|
||||
{
|
||||
public function __construct(string $timezone, ?\Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(
|
||||
sprintf('Ungültige Zeitzone: "%s"', $timezone),
|
||||
0,
|
||||
$previous
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user