Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class Product |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $name; |
||
21 | /** |
||
22 | * @var float |
||
23 | */ |
||
24 | private $price; |
||
25 | |||
26 | /** |
||
27 | * Product constructor. |
||
28 | * @param string $name |
||
29 | * @param float $price |
||
30 | */ |
||
31 | public function __construct(string $name, float $price) |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @Field(name="name") |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getName(): string |
||
42 | { |
||
43 | return $this->name; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @Field(name="price") |
||
48 | * @return float |
||
49 | */ |
||
50 | public function getPrice(): float |
||
53 | } |
||
54 | } |
||
55 |