protected function checkRequirements(): int
    {
        if ($this->documentRoot === null) {
            if ($this->hasOption('docroot')) {
                $this->documentRoot = $this->option('docroot');
            } else {
                $this->error('The document root directory must be either passed as first argument of the constructor or through the "--docroot" input option.');

                return 1;
            }
        }

        if ($this->environment === null) {
            if ($this->hasOption('env')) {
                if (\is_string($env = $this->option('env'))) {
                    $this->environment = $env;
                } else {
                    $this->error('The environment must be either passed as second argument of the constructor or through the "--env" input option.');

                    return 1;
                }
            } else {
                $this->error('The environment must be passed as second argument of the constructor.');

                return 1;
            }
        }

        if ($this->environment === 'prod') {
            $this->error('Running this server in production environment is NOT recommended!');
        }

        return 0;
    }