private function connect(Credentials $credentials) : PDO
    {
        if ($this->pdo === null) {
            $this->pdo = new PDO($credentials->getDSN(), $credentials->getUsername(), $credentials->getPassword());
        }

        return $this->pdo;
    }
private function connect(Credentials $credentials) : PDO
    {
        if ($this->pdo === null) {
            $this->pdo = new PDO($credentials->getDSN(), $credentials->getUsername(), $credentials->getPassword());
        }

        return $this->pdo;
    }
private function connect ( Credentials $ credentials ) : PDO { if ( $ this -> pdo === null ) { $ this -> pdo = new PDO ( $ credentials -> getDSN ( ) , $ credentials -> getUsername ( ) , $ credentials -> getPassword ( ) ) ; } return $ this -> pdo ; }
Makes the actual connection to the database

@param Credentials $credentials
@return PDO
Makes the actual connection to the database