for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ipag\Classes;
use Ipag\Classes\Contracts\Emptiable;
use Ipag\Classes\Traits\EmptiableTrait;
final class Product extends BaseResource implements Emptiable
{
use EmptiableTrait;
/**
* @var string
*/
private $name;
* @var int
private $quantity;
* @var float
private $unitPrice;
private $sku;
* @return string
public function getName()
return $this->name;
}
* @param string $name
public function setName($name)
$this->name = substr($name, 0, 100);
return $this;
* @return int
public function getQuantity()
return $this->quantity;
* @param int $quantity
public function setQuantity($quantity)
$this->quantity = (int) $quantity;
* @return float
public function getUnitPrice()
return $this->unitPrice;
* @param mixed $unitPrice
public function setUnitPrice($unitPrice)
$this->unitPrice = $this->getNumberUtil()->convertToDouble($unitPrice);
public function getSku()
return $this->sku;
* @param string $sku
public function setSku($sku)
$this->sku = substr($sku, 0, 20);