protected function completeServerInfos(array &$infos)
    {
        $infosKeyDefaultValues = [
            'host'   => null,
            'port'   => null,
            'weight' => 0
        ];
        
        foreach ($infosKeyDefaultValues as $infosKey => $defaultValue) {
            if (!isset($infos[$infosKey])) {
                $infos[$infosKey] = $defaultValue;
            }
        }
    }
protected function completeServerInfos(array &$infos)
    {
        $infosKeyDefaultValues = [
            'host'   => null,
            'port'   => null,
            'weight' => 0
        ];
        
        foreach ($infosKeyDefaultValues as $infosKey => $defaultValue) {
            if (!isset($infos[$infosKey])) {
                $infos[$infosKey] = $defaultValue;
            }
        }
    }
protected function completeServerInfos ( array & $ infos ) { $ infosKeyDefaultValues = [ 'host' => null , 'port' => null , 'weight' => 0 ] ; foreach ( $ infosKeyDefaultValues as $ infosKey => $ defaultValue ) { if ( ! isset ( $ infos [ $ infosKey ] ) ) { $ infos [ $ infosKey ] = $ defaultValue ; } } }
Read the server information and add not existing keys

@param array &$infos Server informations

@return void

@throw \Exception If informations datas is not an array
Read the server information and add not existing keys