case-independent environment
This commit is contained in:
parent
d1ff411b87
commit
12cb4b48c9
@ -44,6 +44,8 @@ class Environment
|
|||||||
*/
|
*/
|
||||||
public function __construct(string $value)
|
public function __construct(string $value)
|
||||||
{
|
{
|
||||||
|
$value = strtoupper($value);
|
||||||
|
|
||||||
if (!in_array($value, self::AVAILABLE_VALUES)) {
|
if (!in_array($value, self::AVAILABLE_VALUES)) {
|
||||||
throw new InvalidArgumentException(sprintf('Incorrect environment provided: %s', $value));
|
throw new InvalidArgumentException(sprintf('Incorrect environment provided: %s', $value));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user