protected function getEnvironmentArgument(array $args): ?string
    {
        $callback = static function ($v) {
            return self::startsWith($v, '--env');
        };

        foreach ($args as $key => $value) {
            if ($callback($value)) {
                return $value;
            }
        }

        return null;
    }