Ensured required config options cannot be left empty

This commit is contained in:
Alejandro Celaya
2018-09-30 09:40:43 +02:00
parent 48f01921e1
commit 8323b87076
8 changed files with 83 additions and 22 deletions

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Installer\Exception;
use RuntimeException;
use function sprintf;
class MissingRequiredOptionException extends RuntimeException implements ExceptionInterface
{
public static function fromOption(string $optionName): self
{
return new self(sprintf('The "%s" is required and can\'t be empty', $optionName));
}
}