Advertisement
Guest User

product

a guest
May 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.73 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. namespace Gwo\Recruitment\Entity;
  5.  
  6. class Product
  7. {
  8.     private $id;
  9.     private $unitPrice;
  10.     private $minimumQuantity;
  11.     private $quantity;
  12.     private $item;
  13.  
  14.     /**
  15.      * @return mixed
  16.      */
  17.     public function getItem()
  18.     {
  19.         return $this->item;
  20.     }
  21.  
  22.     /**
  23.      * @param mixed $item
  24.      */
  25.     public function setItem($item): void
  26.     {
  27.         $this->item = $item;
  28.     }
  29.  
  30.  
  31.     /**
  32.      * @return mixed
  33.      */
  34.     public function getQuantity()
  35.     {
  36.         return $this->quantity;
  37.     }
  38.  
  39.     /**
  40.      * @param mixed $quantity
  41.      */
  42.     public function setQuantity($quantity): void
  43.     {
  44.         $this->quantity = $quantity;
  45.     }
  46.  
  47.     /**
  48.      * @return mixed
  49.      */
  50.     public function getMinimumQuantity()
  51.     {
  52.         return $this->minimumQuantity;
  53.     }
  54.  
  55.     /**
  56.      * @return void
  57.      * @param mixed $minimumQuantity
  58.      */
  59.     public function setMinimumQuantity($minimumQuantity): void
  60.     {
  61.         if ($minimumQuantity <= 0) {
  62.             throw new \InvalidArgumentException();
  63.         }
  64.             $this->minimumQuantity = $minimumQuantity;
  65.     }
  66.  
  67.     /**
  68.      * @return mixed
  69.      */
  70.     public function getUnitPrice()
  71.     {
  72.         return $this->unitPrice;
  73.     }
  74.  
  75.     /**
  76.      * @return void
  77.      * @param mixed $unitPrice
  78.      */
  79.     public function setUnitPrice($unitPrice): void
  80.     {
  81.         if ($unitPrice <= 0) {
  82.             throw new \InvalidArgumentException();
  83.         }
  84.         $this->unitPrice = $unitPrice;
  85.     }
  86.     /**
  87.      * @return mixed
  88.      */
  89.     public function getId()
  90.     {
  91.         return $this->id;
  92.     }
  93.  
  94.     public function setId($id)
  95.     {
  96.         $this->id = $id;
  97.  
  98.         return $this;
  99.     }
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement