public function onProduction() : bool
    {
        if (!$this->inRuntime()) {
            return false;
        }

        $prodBranch = $this->onEnterprise() ? 'production' : 'master';

        return $this->getValue('BRANCH') == $prodBranch;
    }
public function onProduction() : bool
    {
        if (!$this->inRuntime()) {
            return false;
        }

        $prodBranch = $this->onEnterprise() ? 'production' : 'master';

        return $this->getValue('BRANCH') == $prodBranch;
    }
public function onProduction ( ) : bool { if ( ! $ this -> inRuntime ( ) ) { return false ; } $ prodBranch = $ this -> onEnterprise ( ) ? 'production' : 'master' ; return $ this -> getValue ( 'BRANCH' ) == $ prodBranch ; }
Determines if the current environment is a production environment.

Note: There may be a few edge cases where this is not entirely correct on Enterprise,
if the production branch is not named `production`.  In that case you'll need to use
your own logic.

@return bool
True if the environment is a production environment, false otherwise.
It will also return false if not running on Platform.sh or in the build phase.
Determines if the current environment is a production environment .