vendor/shopware/core/Content/Product/SalesChannel/Review/MatrixElement.php line 9

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Product\SalesChannel\Review;
  3. if (class_exists('Shopware\Storefront\Page\Product\Review\MatrixElement')) {
  4.     /**
  5.      * @deprecated tag:v6.5.0 - reason:class-hierarchy-change - won't extend the storefront class anymore
  6.      */
  7.     class MatrixElement extends \Shopware\Storefront\Page\Product\Review\MatrixElement
  8.     {
  9.         /**
  10.          * @var int
  11.          */
  12.         protected $points;
  13.         /**
  14.          * @var int
  15.          */
  16.         protected $count;
  17.         /**
  18.          * @var float
  19.          */
  20.         protected $percent;
  21.         public function __construct(int $points, int $count, float $percent = 0.0)
  22.         {
  23.             $this->points = $points;
  24.             $this->count = $count;
  25.             $this->percent = $percent;
  26.         }
  27.         public function getPoints(): int
  28.         {
  29.             return $this->points;
  30.         }
  31.         public function setPoints(int $points): MatrixElement
  32.         {
  33.             $this->points = $points;
  34.             return $this;
  35.         }
  36.         public function getCount(): int
  37.         {
  38.             return $this->count;
  39.         }
  40.         public function setCount(int $count): MatrixElement
  41.         {
  42.             $this->count = $count;
  43.             return $this;
  44.         }
  45.         public function getPercent(): float
  46.         {
  47.             return $this->percent;
  48.         }
  49.         public function setPercent(float $percent): MatrixElement
  50.         {
  51.             $this->percent = $percent;
  52.             return $this;
  53.         }
  54.     }
  55. } else {
  56.     class MatrixElement
  57.     {
  58.         /**
  59.          * @var int
  60.          */
  61.         protected $points;
  62.         /**
  63.          * @var int
  64.          */
  65.         protected $count;
  66.         /**
  67.          * @var float
  68.          */
  69.         protected $percent;
  70.         public function __construct(int $points, int $count, float $percent = 0.0)
  71.         {
  72.             $this->points = $points;
  73.             $this->count = $count;
  74.             $this->percent = $percent;
  75.         }
  76.         public function getPoints(): int
  77.         {
  78.             return $this->points;
  79.         }
  80.         public function setPoints(int $points): MatrixElement
  81.         {
  82.             $this->points = $points;
  83.             return $this;
  84.         }
  85.         public function getCount(): int
  86.         {
  87.             return $this->count;
  88.         }
  89.         public function setCount(int $count): MatrixElement
  90.         {
  91.             $this->count = $count;
  92.             return $this;
  93.         }
  94.         public function getPercent(): float
  95.         {
  96.             return $this->percent;
  97.         }
  98.         public function setPercent(float $percent): MatrixElement
  99.         {
  100.             $this->percent = $percent;
  101.             return $this;
  102.         }
  103.     }
  104. }