| 1 | <?php declare(strict_types = 1); |
||
| 5 | class Category |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var int |
||
| 9 | */ |
||
| 10 | private $id; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $name; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Category constructor. |
||
| 19 | * |
||
| 20 | * @param string $name |
||
| 21 | */ |
||
| 22 | public function __construct(string $name) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param int $id |
||
| 29 | * |
||
| 30 | * @return Category |
||
| 31 | */ |
||
| 32 | public function setId(int $id): Category |
||
| 38 | } |
||
| 39 |