1
0
mirror of synced 2024-11-22 12:56:02 +03:00

case-independent environment

This commit is contained in:
Pavel 2020-10-07 14:50:11 +03:00
parent d1ff411b87
commit 12cb4b48c9

View File

@ -44,6 +44,8 @@ class Environment
*/
public function __construct(string $value)
{
$value = strtoupper($value);
if (!in_array($value, self::AVAILABLE_VALUES)) {
throw new InvalidArgumentException(sprintf('Incorrect environment provided: %s', $value));
}