protected function detectRunningInHook()
    {
        $envPrefix = $this->config()->get('service.env_prefix');
        if (getenv($envPrefix . 'PROJECT')
            && basename(getenv('SHELL')) === 'dash'
            && !$this->isTerminal(STDIN)) {
            return true;
        }

        return false;
    }
protected function detectRunningInHook()
    {
        $envPrefix = $this->config()->get('service.env_prefix');
        if (getenv($envPrefix . 'PROJECT')
            && basename(getenv('SHELL')) === 'dash'
            && !$this->isTerminal(STDIN)) {
            return true;
        }

        return false;
    }
protected function detectRunningInHook ( ) { $ envPrefix = $ this -> config ( ) -> get ( 'service.env_prefix' ) ; if ( getenv ( $ envPrefix . 'PROJECT' ) && basename ( getenv ( 'SHELL' ) ) === 'dash' && ! $ this -> isTerminal ( STDIN ) ) { return true ; } return false ; }
Detects a Platform.sh non-terminal Dash environment; i.e. a hook.

@return bool
Detects a Platform . sh non - terminal Dash environment ; i . e . a hook .