public function getPort()
    {
        $defaultPorts = array(
            'mysql' => '3306',
            'pgsql' => '5432',
            'oci' => '1521',
        );
        if (!$this->rawConfig['port'] && isset($defaultPorts[$this->getType()])) {
            $this->rawConfig['port'] = $defaultPorts[$this->getType()];
        }

        return intval($this->rawConfig['port']);
    }