for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Nelexa\GPlay\Model;
class HistogramRating
{
/**
* @var int
*/
private $fiveStars;
private $fourStars;
private $threeStars;
private $twoStars;
private $oneStar;
* HistogramRating constructor.
*
* @param int $fiveStars
* @param int $fourStars
* @param int $threeStars
* @param int $twoStars
* @param int $oneStar
public function __construct(int $fiveStars, int $fourStars, int $threeStars, int $twoStars, int $oneStar)
$this->fiveStars = $fiveStars;
$this->fourStars = $fourStars;
$this->threeStars = $threeStars;
$this->twoStars = $twoStars;
$this->oneStar = $oneStar;
}
* @return int
public function getFiveStars(): int
return $this->fiveStars;
public function getFourStars(): int
return $this->fourStars;
public function getThreeStars(): int
return $this->threeStars;
public function getTwoStars(): int
return $this->twoStars;
public function getOneStar(): int
return $this->oneStar;
* @return string
public function __toString()
return sprintf(
"⭐⭐⭐⭐⭐ %d\n⭐⭐⭐⭐ %d\n⭐⭐⭐ %d\n⭐⭐ %d\n⭐ %d",
$this->fiveStars,
$this->fourStars,
$this->threeStars,
$this->twoStars,
$this->oneStar
);