| Total Complexity | 7 |
| Total Lines | 93 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class HistogramRating |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var int |
||
| 10 | */ |
||
| 11 | private $fiveStars; |
||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | private $fourStars; |
||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | private $threeStars; |
||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | private $twoStars; |
||
| 24 | /** |
||
| 25 | * @var int |
||
| 26 | */ |
||
| 27 | private $oneStar; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * HistogramRating constructor. |
||
| 31 | * |
||
| 32 | * @param int $fiveStars |
||
| 33 | * @param int $fourStars |
||
| 34 | * @param int $threeStars |
||
| 35 | * @param int $twoStars |
||
| 36 | * @param int $oneStar |
||
| 37 | */ |
||
| 38 | public function __construct(int $fiveStars, int $fourStars, int $threeStars, int $twoStars, int $oneStar) |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return int |
||
| 49 | */ |
||
| 50 | public function getFiveStars(): int |
||
| 51 | { |
||
| 52 | return $this->fiveStars; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return int |
||
| 57 | */ |
||
| 58 | public function getFourStars(): int |
||
| 59 | { |
||
| 60 | return $this->fourStars; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return int |
||
| 65 | */ |
||
| 66 | public function getThreeStars(): int |
||
| 67 | { |
||
| 68 | return $this->threeStars; |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return int |
||
| 73 | */ |
||
| 74 | public function getTwoStars(): int |
||
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return int |
||
| 81 | */ |
||
| 82 | public function getOneStar(): int |
||
| 83 | { |
||
| 84 | return $this->oneStar; |
||
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return string |
||
| 89 | */ |
||
| 90 | public function __toString() |
||
| 99 | ); |
||
| 100 | } |
||
| 101 | } |
||
| 102 |