Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
10 / 10 |
| Product | |
100.00% |
1 / 1 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
10 / 10 |
| getId | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| setName | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| getName | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| setDescription | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| getDescription | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| setPrice | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| getPrice | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| <?php | |
| namespace AppBundle\Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Symfony\Component\Validator\Constraints as Assert; | |
| /** | |
| * | |
| * @ORM\Table(name="product") | |
| * @ORM\Entity(repositoryClass="AppBundle\Repository\ProductRepository") | |
| */ | |
| class Product | |
| { | |
| /** | |
| * @ORM\Column(name="id", type="integer") | |
| * @ORM\Id | |
| * @ORM\GeneratedValue | |
| */ | |
| private $id; | |
| /** | |
| * @ORM\Column(name="name", type="string") | |
| */ | |
| private $name; | |
| /** | |
| * @ORM\Column(name="description", type="string") | |
| */ | |
| private $description; | |
| /** | |
| * @ORM\Column(name="price", type="float") | |
| */ | |
| private $price; | |
| /** | |
| * Get id | |
| * | |
| * @return integer | |
| */ | |
| public function getId() | |
| { | |
| return $this->id; | |
| } | |
| /** | |
| * Set name | |
| * | |
| * @param string $name | |
| * | |
| * @return Product | |
| */ | |
| public function setName($name) | |
| { | |
| $this->name = $name; | |
| return $this; | |
| } | |
| /** | |
| * Get name | |
| * | |
| * @return string | |
| */ | |
| public function getName() | |
| { | |
| return $this->name; | |
| } | |
| /** | |
| * Set description | |
| * | |
| * @param string $description | |
| * | |
| * @return Product | |
| */ | |
| public function setDescription($description) | |
| { | |
| $this->description = $description; | |
| return $this; | |
| } | |
| /** | |
| * Get description | |
| * | |
| * @return string | |
| */ | |
| public function getDescription() | |
| { | |
| return $this->description; | |
| } | |
| /** | |
| * Set price | |
| * | |
| * @param float $price | |
| * | |
| * @return Product | |
| */ | |
| public function setPrice($price) | |
| { | |
| $this->price = $price; | |
| return $this; | |
| } | |
| /** | |
| * Get price | |
| * | |
| * @return float | |
| */ | |
| public function getPrice() | |
| { | |
| return $this->price; | |
| } | |
| } |