vendor/shopware/core/Framework/DataAbstractionLayer/Search/Aggregation/Metric/StatsAggregation.php line 12

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\DataAbstractionLayer\Search\Aggregation\Metric;
  3. use Shopware\Core\Framework\DataAbstractionLayer\Search\Aggregation\Aggregation;
  4. use Shopware\Core\Framework\Log\Package;
  5. /**
  6.  * @final tag:v6.5.0
  7.  */
  8. #[Package('core')]
  9. class StatsAggregation extends Aggregation
  10. {
  11.     /**
  12.      * @var bool
  13.      */
  14.     private $max;
  15.     /**
  16.      * @var bool
  17.      */
  18.     private $min;
  19.     /**
  20.      * @var bool
  21.      */
  22.     private $sum;
  23.     /**
  24.      * @var bool
  25.      */
  26.     private $avg;
  27.     public function __construct(string $namestring $fieldbool $max truebool $min truebool $sum truebool $avg true)
  28.     {
  29.         parent::__construct($name$field);
  30.         $this->max $max;
  31.         $this->min $min;
  32.         $this->sum $sum;
  33.         $this->avg $avg;
  34.     }
  35.     public function fetchMax(): bool
  36.     {
  37.         return $this->max;
  38.     }
  39.     public function fetchMin(): bool
  40.     {
  41.         return $this->min;
  42.     }
  43.     public function fetchSum(): bool
  44.     {
  45.         return $this->sum;
  46.     }
  47.     public function fetchAvg(): bool
  48.     {
  49.         return $this->avg;
  50.     }
  51. }