collection-crud/src/Entity/PurchasePriceTrait.php

33 lines
457 B
PHP
Raw Normal View History

2018-07-18 11:35:27 -04:00
<?php declare(strict_types=1);
2017-11-30 15:06:13 -05:00
namespace App\Entity;
2017-11-30 15:06:13 -05:00
trait PurchasePriceTrait
{
/**
* Set purchasePrice
*
* @param string $purchasePrice
*/
public function setPurchasePrice($purchasePrice): self
2017-11-30 15:06:13 -05:00
{
$this->purchasePrice = $purchasePrice;
return $this;
}
/**
* Get purchasePrice
*
* @return string
*/
public function getPurchasePrice()
{
if (empty($this->purchasePrice)) {
return 0;
}
return $this->purchasePrice;
}
}