| Total Complexity | 10 |
| Total Lines | 144 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | class Review |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | private $id; |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $url; |
||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $userName; |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $text; |
||
| 24 | /** |
||
| 25 | * @var GoogleImage |
||
| 26 | */ |
||
| 27 | private $avatar; |
||
| 28 | /** |
||
| 29 | * @var \DateTimeInterface |
||
| 30 | */ |
||
| 31 | private $date; |
||
| 32 | /** |
||
| 33 | * @var int |
||
| 34 | */ |
||
| 35 | private $score; |
||
| 36 | /** |
||
| 37 | * @var int |
||
| 38 | */ |
||
| 39 | private $likeCount; |
||
| 40 | /** |
||
| 41 | * @var ReplyReview|null |
||
| 42 | */ |
||
| 43 | private $reply; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Review constructor. |
||
| 47 | * |
||
| 48 | * @param string $id |
||
| 49 | * @param string $url |
||
| 50 | * @param string $userName |
||
| 51 | * @param string $text |
||
| 52 | * @param GoogleImage $avatar |
||
| 53 | * @param \DateTimeInterface $date |
||
| 54 | * @param int $score |
||
| 55 | * @param int $likeCount |
||
| 56 | * @param ReplyReview|null $reply |
||
| 57 | */ |
||
| 58 | public function __construct( |
||
| 59 | string $id, |
||
| 60 | string $url, |
||
| 61 | string $userName, |
||
| 62 | string $text, |
||
| 63 | GoogleImage $avatar, |
||
| 64 | \DateTimeInterface $date, |
||
| 65 | int $score, |
||
| 66 | int $likeCount = 0, |
||
| 67 | ?ReplyReview $reply = null |
||
| 68 | ) { |
||
| 69 | $this->id = $id; |
||
| 70 | $this->url = $url; |
||
| 71 | $this->userName = $userName; |
||
| 72 | $this->text = $text; |
||
| 73 | $this->avatar = $avatar; |
||
| 74 | $this->date = $date; |
||
| 75 | $this->score = $score; |
||
| 76 | $this->likeCount = $likeCount; |
||
| 77 | $this->reply = $reply; |
||
| 78 | } |
||
| 79 | |||
| 80 | /** |
||
| 81 | * @return string |
||
| 82 | */ |
||
| 83 | public function getId(): string |
||
| 86 | } |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @return string |
||
| 90 | */ |
||
| 91 | public function getUrl(): string |
||
| 92 | { |
||
| 93 | return $this->url; |
||
| 94 | } |
||
| 95 | |||
| 96 | /** |
||
| 97 | * @return string |
||
| 98 | */ |
||
| 99 | public function getUserName(): string |
||
| 100 | { |
||
| 101 | return $this->userName; |
||
| 102 | } |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @return string |
||
| 106 | */ |
||
| 107 | public function getText(): string |
||
| 108 | { |
||
| 109 | return $this->text; |
||
| 110 | } |
||
| 111 | |||
| 112 | /** |
||
| 113 | * @return GoogleImage |
||
| 114 | */ |
||
| 115 | public function getAvatar(): GoogleImage |
||
| 116 | { |
||
| 117 | return $this->avatar; |
||
| 118 | } |
||
| 119 | |||
| 120 | /** |
||
| 121 | * @return \DateTimeInterface |
||
| 122 | */ |
||
| 123 | public function getDate(): \DateTimeInterface |
||
| 124 | { |
||
| 125 | return $this->date; |
||
| 126 | } |
||
| 127 | |||
| 128 | /** |
||
| 129 | * @return int |
||
| 130 | */ |
||
| 131 | public function getScore(): int |
||
| 132 | { |
||
| 133 | return $this->score; |
||
| 134 | } |
||
| 135 | |||
| 136 | /** |
||
| 137 | * @return int |
||
| 138 | */ |
||
| 139 | public function getLikeCount(): int |
||
| 142 | } |
||
| 143 | |||
| 144 | /** |
||
| 145 | * @return ReplyReview|null |
||
| 146 | */ |
||
| 147 | public function getReply(): ?ReplyReview |
||
| 150 | } |
||
| 151 | } |
||
| 152 |