| Total Complexity | 7 |
| Total Lines | 81 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class BookView |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $id; |
||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $name; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $description; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var CategoryView |
||
| 28 | */ |
||
| 29 | private $category; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var AuthorView |
||
| 33 | */ |
||
| 34 | private $author; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * BookView constructor. |
||
| 38 | * |
||
| 39 | * @param string $id |
||
| 40 | * @param string $name |
||
| 41 | * @param string $description |
||
| 42 | * @param CategoryView $category |
||
| 43 | * @param AuthorView $author |
||
| 44 | */ |
||
| 45 | public function __construct(string $id, string $name, string $description, CategoryView $category, AuthorView $author) |
||
| 46 | { |
||
| 47 | $this->id = $id; |
||
| 48 | $this->name = $name; |
||
| 49 | $this->description = $description; |
||
| 50 | $this->category = $category; |
||
| 51 | $this->author = $author; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function getId(): string |
||
| 55 | { |
||
| 56 | return $this->id; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function getName(): string |
||
| 60 | { |
||
| 61 | return $this->name; |
||
| 62 | } |
||
| 63 | |||
| 64 | public function changeName(string $name) |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getDescription(): string |
||
| 73 | { |
||
| 74 | return $this->description; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return CategoryView |
||
| 79 | */ |
||
| 80 | public function getCategory(): CategoryView |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @return AuthorView |
||
| 87 | */ |
||
| 88 | public function getAuthor(): AuthorView |
||
| 91 | } |
||
| 92 | } |
||
| 93 |