vendor/shopware/core/Framework/DataAbstractionLayer/Search/AggregationResult/Metric/StatsResult.php line 10

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\Metric;
  3. use Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResult;
  4. use Shopware\Core\Framework\Log\Package;
  5. /**
  6.  * @final
  7.  */
  8. #[Package('core')]
  9. class StatsResult extends AggregationResult
  10. {
  11.     public function __construct(
  12.         string $name,
  13.         protected mixed $min,
  14.         protected mixed $max,
  15.         protected ?float $avg,
  16.         protected ?float $sum
  17.     ) {
  18.         parent::__construct($name);
  19.     }
  20.     public function getMin(): mixed
  21.     {
  22.         return $this->min;
  23.     }
  24.     public function getMax(): mixed
  25.     {
  26.         return $this->max;
  27.     }
  28.     public function getAvg(): ?float
  29.     {
  30.         return $this->avg;
  31.     }
  32.     public function getSum(): ?float
  33.     {
  34.         return $this->sum;
  35.     }
  36. }