Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
CRAP | |
100.00% |
1 / 1 |
| Product | |
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
8 | |
100.00% |
1 / 1 |
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPrice | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getImage | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setPrice | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setImage | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Models; |
| 3 | |
| 4 | class Product { |
| 5 | private $id; |
| 6 | private $name; |
| 7 | private $price; |
| 8 | private $image; |
| 9 | |
| 10 | // Getters |
| 11 | public function getId() { return $this->id; } |
| 12 | public function getName() { return $this->name; } |
| 13 | public function getPrice() { return $this->price; } |
| 14 | public function getImage() { return $this->image; } |
| 15 | |
| 16 | // Setters |
| 17 | public function setName($name) { $this->name = $name; } |
| 18 | public function setPrice($price) { $this->price = $price; } |
| 19 | public function setImage($image) { $this->image = $image; } |
| 20 | |
| 21 | public function setId($id) { |
| 22 | $this->id = $id; |
| 23 | } |
| 24 | } |