protected function isServerRunningForApp($appId, $projectRoot)
    {
        foreach ($this->getServerInfo() as $address => $server) {
            if ($server['appId'] === $appId && $server['projectRoot'] === $projectRoot) {
                if ($this->isProcessDead($server['pid'])) {
                    $this->stopServer($address);
                    continue;
                }
                return $server;
            }
        }

        return false;
    }
protected function isServerRunningForApp($appId, $projectRoot)
    {
        foreach ($this->getServerInfo() as $address => $server) {
            if ($server['appId'] === $appId && $server['projectRoot'] === $projectRoot) {
                if ($this->isProcessDead($server['pid'])) {
                    $this->stopServer($address);
                    continue;
                }
                return $server;
            }
        }

        return false;
    }
protected function isServerRunningForApp ( $ appId , $ projectRoot ) { foreach ( $ this -> getServerInfo ( ) as $ address => $ server ) { if ( $ server [ 'appId' ] === $ appId && $ server [ 'projectRoot' ] === $ projectRoot ) { if ( $ this -> isProcessDead ( $ server [ 'pid' ] ) ) { $ this -> stopServer ( $ address ) ; continue ; } return $ server ; } } return false ; }
Check whether another server is running for an app.

@param string $appId
@param string $projectRoot

@return bool|array
Check whether another server is running for an app .