Determine whether the current environment is production

@return bool
163206
public function isProd(): bool
    {
        $nodeType = $this->isEmulated()
            ? $this->emulatedNodeType
            : $this->nodeType;

        return ($nodeType === self::PROD || $nodeType === self::STAGE);
    }
572736
public function check()
    {
        if (function_exists($this->functionName)) {
            return [EnvironmentCheck::OK, $this->functionName . '() exists'];
        }
        return [EnvironmentCheck::ERROR, $this->functionName . '() doesn\'t exist'];
    }
680030
public function getEnvironment()
    {
        if ($this->environment === null) {
            $this->setEnvironment($this->getFact(Model\NodeInterface::ENVIRONMENT_FACT));
        }
        return $this->environment;
    }
264636
public static function check()
    {
        if (Session::has(self::ENVIRONMENT_NAME)) {
            return true;
        }

        Session::forget(self::ENVIRONMENT_NAME);
        return false;
    }
505375
public function isEngineRunning()
    {
        foreach (array_keys($this->getServices()) as $name) {
            $container = $this->getServiceContainerId($name);
            if (!$this->isContainerRunning($container)) {
                return false;
            }
        }

        return true;
    }
579399
public function hasActualContainer(): bool
    {
        if (false === $this->environment->isDebug())
        {
            return true === $this->configCache()->isFresh();
        }

        return false;
    }
1303771
protected function checkEnvironment()
	{
		if( version_compare( TYPO3_version, '9.0', '<' ) ) {
			return;
		}

		$objectManager = GeneralUtility::makeInstance( ObjectManager::class );
		$connectionPool = $objectManager->get( TYPO3\CMS\Core\Database\ConnectionPool::class );
		$connection = $connectionPool->getQueryBuilderForTable( 'fe_user' )->getConnection();
		$params = $connection->getParams();

		if( strpos( $connection->getServerVersion(), 'MySQL' ) === false ) {
			return;
		}

		// MariaDB might get identified as a 'MySQL 5.5.5' for some reason
		$result = $connection->prepare('SELECT version()');
		$result->execute();
		$rows = $result->fetchAll();

		if( !isset( $rows[0]['version()'] ) ) {
			return;
		}

		$version = $rows[0]['version()']; // Something like '10.1.29-MariaDB' or '5.6.33-0ubuntu0'

		// Only MySQL < 5.7 and MariaDB < 10.2 don't work
		if( ( strpos( $version, 'MariaDB' ) !== false && version_compare( $version, '10.2', '>=' ) )
			|| version_compare( $version, '5.7', '>=' )
		) {
			return;
		}

		// MySQL < 5.7 and utf8mb4 charset doesn't work due to missing long index support
		if( isset( $params['tableoptions']['charset'] ) && $params['tableoptions']['charset'] !== 'utf8mb4' ) {
			return;
		}

		// Retrieve the name of the connection (which is not part of the connection class)
		foreach ( $connectionPool->getConnectionNames() as $name )
		{
			if( $connectionPool->getConnectionByName( $name ) === $connection ) {
				break;
			}
		}

		$msg = $objectManager->get(
			FlashMessage::class,
			LocalizationUtility::translate( 'LLL:EXT:aimeos/Resources/Private/Language/admin.xlf:t3_9x_config_error_text', 'aimeos', [$name] ),
			LocalizationUtility::translate( 'LLL:EXT:aimeos/Resources/Private/Language/admin.xlf:t3_9x_config_error_header' ),
			FlashMessage::ERROR
		);

		return $objectManager->get( FlashMessageRendererResolver::class )->resolve()->render( [$msg] ) .
			LocalizationUtility::translate( 'LLL:EXT:aimeos/Resources/Private/Language/admin.xlf:t3_9x_config_error_remedy' );
	}
35467
protected function proceedWhenInProduction()
    {
        if (env('APP_ENV', 'production') == 'production' && ! $this->option('silent')) {
            $this->warn('Application is in production!');
            $proceed = $this->ask('Are you sure you want to continue? (y/n)', 'n');
            if (! empty($proceed) && $proceed == 'y' || $proceed == 'yes') {
                return true;
            } else {
                $this->info('Abandoned change');
                return false;
            }
        }
        return true;

    }
1035751
public function check()
    {
        if (class_exists($this->className)) {
            return [EnvironmentCheck::OK, 'Class ' . $this->className.' exists'];
        }
        return [EnvironmentCheck::ERROR, 'Class ' . $this->className.' doesn\'t exist'];
    }
252139
private function isRunning()
    {
        if (!is_resource($this->process)) {
            return false;
        }

        $status = proc_get_status($this->process);

        return $status['running'];
    }
850246
protected function checkEnvVariable()
    {
        $key = $this->checkKey();
        $output = $this->execSSH("cd $this->domain;cat .env");
        if (str_contains($output, $key)) {
            $this->info("Key $key found in remote environment file");
        } else {
            $this->error("Key $key NOT found in remote environment file");
        }
    }
849451
public function isSupported()
    {
        $mixer = $this->getMixer();

        //Disable controller persistency on requests containing the tmpl variable set to component (modal boxes)
        if ($mixer->getRequest()->query->get('tmpl', 'cmd') === 'component') {
            return false;
        }

        return parent::isSupported();
    }
407105
private function checkHosts():bool
    {
        if (null === $this->config) {
            return (true);
        }
        $current_env = FEnv::get("framework.env");
        $ip = ToolsExceptions::getClientIp();
        $result = true;
        if ("dev" === $current_env) {
            if (property_exists($this->config, "hosts_denied_dev")) {
                $dd = $this->config->hosts_denied_dev;
                if (null !== $dd) {
                    if (false != in_array("*", $dd)) {
                        $result = false;
                    } elseif (false != in_array($ip, $dd)) {
                        $result = false;
                    }
                }
            }
            if (property_exists($this->config, "hosts_allowed_dev")) {
                $dd = $this->config->hosts_allowed_dev;
                if (null !== $dd) {
                    if (true == in_array("*", $dd) && $result) {
                        $result = true;
                    } elseif (true === in_array($ip, $dd) && false === $result) {
                        $result = true;
                    }
                }
            }
        } elseif ("prod" === $current_env) {
            if (property_exists($this->config, "hosts_denied_prod")) {
                $dd = $this->config->hosts_denied_prod;
                if (null !== $dd) {
                    if (false != in_array("*", $dd)) {
                        $result = false;
                    } elseif (false != in_array($ip, $dd)) {
                        $result = false;
                    }
                }
            }
            if (property_exists($this->config, "hosts_allowed_prod")) {
                $dd = $this->config->hosts_allowed_prod;
                if (null !== $dd) {
                    if (true == in_array("*", $dd) && $result) {
                        $result = true;
                    } elseif (true === in_array($ip, $dd) && false === $result) {
                        $result = true;
                    }
                }
            }
        }

        if (false === $result) {
            throw new Server403(new \ArrayObject(array("solution" =>
                "Add the current host to the allowed hosts list")));
        }

        return (true);
    }
1015767
public function hasManifest()
    {
        $server = $this->releasesManager->getCurrentReleasePath($this->manifest);
        $server = $this->bash->fileExists($server);

        $local = $this->getManifestPath();
        $local = $this->files->has($local);

        return $local || $server;
    }
332667
public function isValid() {
		if (is_resource($this->process)) {
			$status = proc_get_status($this->process);
			return $status['running'];
		} else {
			return false;
		}
	}
509468
public static function EnvironmentDetectByIps () {
		if (static::$environment === NULL) {
			$request = & \MvcCore\Application::GetInstance()->GetRequest();
			$serverAddress = $request->GetServerIp();
			$remoteAddress = $request->GetClientIp();
			if ($serverAddress == $remoteAddress) {
				static::$environment = static::ENVIRONMENT_DEVELOPMENT;
			} else {
				static::$environment = static::ENVIRONMENT_PRODUCTION;
			}
		}
		return static::$environment;
	}
1317065
public function environment()
    {
        if ($this->environment) {
            return $this->environment;
        }

        if (!$this->environmentProvider) {
            $this->environment = static::PRODUCTION;
            return $this->environment;
        }

        $this->setEnvironment(call_user_func($this->environmentProvider, $this));

        return $this->environment;
    }