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

Open in your IDE?
  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 tag:v6.5.0
  7.  */
  8. #[Package('core')]
  9. class StatsResult extends AggregationResult
  10. {
  11.     /**
  12.      * @var mixed|null
  13.      */
  14.     protected $min;
  15.     /**
  16.      * @var mixed|null
  17.      */
  18.     protected $max;
  19.     /**
  20.      * @var float|null
  21.      */
  22.     protected $avg;
  23.     /**
  24.      * @var float|null
  25.      */
  26.     protected $sum;
  27.     public function __construct(string $name$min$max, ?float $avg, ?float $sum)
  28.     {
  29.         parent::__construct($name);
  30.         $this->min $min;
  31.         $this->max $max;
  32.         $this->avg $avg;
  33.         $this->sum $sum;
  34.     }
  35.     public function getMin()
  36.     {
  37.         return $this->min;
  38.     }
  39.     public function getMax()
  40.     {
  41.         return $this->max;
  42.     }
  43.     public function getAvg(): ?float
  44.     {
  45.         return $this->avg;
  46.     }
  47.     public function getSum(): ?float
  48.     {
  49.         return $this->sum;
  50.     }
  51. }