src/Common/Connection.php
protected function readOne($query, $parameters)
    {
        $statement = $this->execute($query, $parameters);

        $rowCount = $statement->rowCount();
        if ($rowCount > 1) {
            throw new MultipleRowFoundException('Multiple row found for query: ' . $query);
        }

        if ($rowCount === 0) {
            throw new RowNotFoundException('Row not found for query: ' . $query);
        }

        return $statement;
    }
protected function readOne($query, $parameters)
    {
        $statement = $this->execute($query, $parameters);

        $rowCount = $statement->rowCount();
        if ($rowCount > 1) {
            throw new MultipleRowFoundException('Multiple row found for query: ' . $query);
        }

        if ($rowCount === 0) {
            throw new RowNotFoundException('Row not found for query: ' . $query);
        }

        return $statement;
    }
protected function readOne ( $ query , $ parameters ) { $ statement = $ this -> execute ( $ query , $ parameters ) ; $ rowCount = $ statement -> rowCount ( ) ; if ( $ rowCount > 1 ) { throw new MultipleRowFoundException ( 'Multiple row found for query: ' . $ query ) ; } if ( $ rowCount === 0 ) { throw new RowNotFoundException ( 'Row not found for query: ' . $ query ) ; } return $ statement ; }
Return the statement checked that the result contains only 1 row

@param string $query
@param array  $parameters

@return \PDOStatement
@throws MultipleRowFoundException
@throws RowNotFoundException
Return the statement checked that the result contains only 1 row