Skip to content

Commit

Permalink
Delete unused PostgreSQLCustomerDAO::setValues.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaragunde committed Jan 25, 2022
1 parent e4f3dbe commit 4839173
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions model/dao/CustomerDAO/PostgreSQLCustomerDAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,13 @@ function __construct() {
parent::__construct();
}

/** Customer value object constructor for PostgreSQL.
*
* This function creates a new {@link CustomerVO} with data retrieved from database.
*
* @param array $row an array with the Customer values from a row.
* @return CustomerVO a {@link CustomerVO} with its properties set to the values from <var>$row</var>.
* @see CustomerVO
/**
* This method is declared to fulfill this class as non-abstract, but it should not be used.
* PDO::FETCH_CLASS now takes care of transforming DB rows into VO objects.
*/
protected function setValues($row)
{

$customerVO = new CustomerVO();

$customerVO->setId($row['id']);
$customerVO->setName($row['name']);
$customerVO->setType($row['type']);
$customerVO->setUrl($row['url']);
$customerVO->setSectorId($row['sectorid']);

return $customerVO;
error_log("Unused CustomerDAO::setValues() called");
}

/** Customer retriever by id.
Expand Down

0 comments on commit 4839173

Please sign in to comment.