| Total Complexity | 8 |
| Total Lines | 91 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Article implements \JsonSerializable |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string $description |
||
| 13 | */ |
||
| 14 | protected $description; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var int $price |
||
| 18 | */ |
||
| 19 | protected $price; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int $quantity |
||
| 23 | */ |
||
| 24 | protected $quantity; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public function getDescription() |
||
| 30 | { |
||
| 31 | return $this->description; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $description |
||
| 36 | * |
||
| 37 | * @return Article |
||
| 38 | */ |
||
| 39 | public function setDescription($description) |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return int |
||
| 48 | */ |
||
| 49 | public function getPrice() |
||
| 50 | { |
||
| 51 | return $this->price; |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param int $price |
||
| 56 | * |
||
| 57 | * @return Article |
||
| 58 | */ |
||
| 59 | public function setPrice($price) |
||
| 60 | { |
||
| 61 | $this->price = $price; |
||
| 62 | |||
| 63 | return $this; |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return int |
||
| 68 | */ |
||
| 69 | public function getQuantity() |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param int $quantity |
||
| 76 | * |
||
| 77 | * @return Article |
||
| 78 | */ |
||
| 79 | public function setQuantity($quantity) |
||
| 84 | } |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Encode protected properties |
||
| 88 | * |
||
| 89 | * @return array |
||
| 90 | */ |
||
| 91 | public function jsonSerialize() |
||
| 100 | } |
||
| 101 | } |
||
| 102 |