| Total Complexity | 132 |
| Total Lines | 1423 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like Product often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Product, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 28 | class Product extends AbstractEntity implements ProductInterface |
||
| 29 | { |
||
| 30 | use ProductTrait; |
||
| 31 | use Timestampable; |
||
| 32 | use SoftDeletable; |
||
| 33 | use Translatable; |
||
| 34 | |||
| 35 | protected $hydrateConversions = [ |
||
| 36 | 'id' => 'externalId' |
||
| 37 | ]; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var int |
||
| 41 | * |
||
| 42 | * @ORM\Id |
||
| 43 | * @ORM\GeneratedValue |
||
| 44 | * @ORM\Column(type="integer") |
||
| 45 | **/ |
||
| 46 | protected $id; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @var int |
||
| 50 | * |
||
| 51 | * @ORM\Column(type="integer", unique=true) |
||
| 52 | */ |
||
| 53 | protected $externalId; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @var string|null |
||
| 57 | * |
||
| 58 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 59 | */ |
||
| 60 | protected $barCodeNumber; |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @var array|null |
||
| 64 | * |
||
| 65 | * @ORM\Column(nullable=true, type="json") |
||
| 66 | */ |
||
| 67 | protected $categoryIdList; |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @var string|null |
||
| 71 | * |
||
| 72 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 73 | */ |
||
| 74 | protected $comments; |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @var float|null |
||
| 78 | * |
||
| 79 | * @ORM\Column(nullable=true, type="decimal", precision=12, scale=2) |
||
| 80 | */ |
||
| 81 | protected $costPrice; |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @var \DateTimeImmutable|null |
||
| 85 | * |
||
| 86 | * @ORM\Column(nullable=true, type="datetime_immutable", options={"comment"="Created info from Dandomain"}) |
||
| 87 | */ |
||
| 88 | protected $created; |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @var string|null |
||
| 92 | * |
||
| 93 | * @ORM\Column(nullable=true, type="string", length=191, options={"comment"="Created by info from Dandomain"}) |
||
| 94 | */ |
||
| 95 | protected $createdBy; |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @var int|null |
||
| 99 | * |
||
| 100 | * @ORM\Column(nullable=true, type="integer") |
||
| 101 | */ |
||
| 102 | protected $defaultCategoryId; |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @var array|null |
||
| 106 | * |
||
| 107 | * @ORM\Column(nullable=true, type="json") |
||
| 108 | */ |
||
| 109 | protected $disabledVariantIdList; |
||
| 110 | |||
| 111 | /** |
||
| 112 | * @var string|null |
||
| 113 | * |
||
| 114 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 115 | */ |
||
| 116 | protected $edbPriserProductNumber; |
||
| 117 | |||
| 118 | /** |
||
| 119 | * @var string|null |
||
| 120 | * |
||
| 121 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 122 | */ |
||
| 123 | protected $fileSaleLink; |
||
| 124 | |||
| 125 | /** |
||
| 126 | * @var string|null |
||
| 127 | * |
||
| 128 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 129 | */ |
||
| 130 | protected $googleFeedCategory; |
||
| 131 | |||
| 132 | /** |
||
| 133 | * @var bool|null |
||
| 134 | * |
||
| 135 | * @ORM\Column(nullable=true, type="boolean") |
||
| 136 | */ |
||
| 137 | protected $isGiftCertificate; |
||
| 138 | |||
| 139 | /** |
||
| 140 | * @var bool|null |
||
| 141 | * |
||
| 142 | * @ORM\Column(nullable=true, type="boolean") |
||
| 143 | */ |
||
| 144 | protected $isModified; |
||
| 145 | |||
| 146 | /** |
||
| 147 | * @var bool|null |
||
| 148 | * |
||
| 149 | * @ORM\Column(nullable=true, type="boolean") |
||
| 150 | */ |
||
| 151 | protected $isRateVariants; |
||
| 152 | |||
| 153 | /** |
||
| 154 | * @var bool|null |
||
| 155 | * |
||
| 156 | * @ORM\Column(nullable=true, type="boolean") |
||
| 157 | */ |
||
| 158 | protected $isReviewVariants; |
||
| 159 | |||
| 160 | /** |
||
| 161 | * @var bool|null |
||
| 162 | * |
||
| 163 | * @ORM\Column(nullable=true, type="boolean") |
||
| 164 | */ |
||
| 165 | protected $isVariantMaster; |
||
| 166 | |||
| 167 | /** |
||
| 168 | * @var string|null |
||
| 169 | * |
||
| 170 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 171 | */ |
||
| 172 | protected $locationNumber; |
||
| 173 | |||
| 174 | /** |
||
| 175 | * @var array|null |
||
| 176 | * |
||
| 177 | * @ORM\Column(nullable=true, type="json") |
||
| 178 | */ |
||
| 179 | protected $manufacturereIdList; |
||
| 180 | |||
| 181 | /** |
||
| 182 | * @var int|null |
||
| 183 | * |
||
| 184 | * @ORM\Column(nullable=true, type="integer") |
||
| 185 | */ |
||
| 186 | protected $maxBuyAmount; |
||
| 187 | |||
| 188 | /** |
||
| 189 | * @var int|null |
||
| 190 | * |
||
| 191 | * @ORM\Column(nullable=true, type="integer") |
||
| 192 | */ |
||
| 193 | protected $minBuyAmount; |
||
| 194 | |||
| 195 | /** |
||
| 196 | * @var int|null |
||
| 197 | * |
||
| 198 | * @ORM\Column(nullable=true, type="integer") |
||
| 199 | */ |
||
| 200 | protected $minBuyAmountB2B; |
||
| 201 | |||
| 202 | /** |
||
| 203 | * The product number |
||
| 204 | * |
||
| 205 | * @var string|null |
||
| 206 | * |
||
| 207 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 208 | */ |
||
| 209 | protected $number; |
||
| 210 | |||
| 211 | /** |
||
| 212 | * @var string|null |
||
| 213 | * |
||
| 214 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 215 | */ |
||
| 216 | protected $picture; |
||
| 217 | |||
| 218 | /** |
||
| 219 | * @var int|null |
||
| 220 | * |
||
| 221 | * @ORM\Column(nullable=true, type="integer") |
||
| 222 | */ |
||
| 223 | protected $salesCount; |
||
| 224 | |||
| 225 | /** |
||
| 226 | * @var array|null |
||
| 227 | * |
||
| 228 | * @ORM\Column(nullable=true, type="json") |
||
| 229 | */ |
||
| 230 | protected $segmentIdList; |
||
| 231 | |||
| 232 | /** |
||
| 233 | * @var int|null |
||
| 234 | * |
||
| 235 | * @ORM\Column(nullable=true, type="integer") |
||
| 236 | */ |
||
| 237 | protected $sortOrder; |
||
| 238 | |||
| 239 | /** |
||
| 240 | * @var int|null |
||
| 241 | * |
||
| 242 | * @ORM\Column(nullable=true, type="integer") |
||
| 243 | */ |
||
| 244 | protected $stockCount; |
||
| 245 | |||
| 246 | /** |
||
| 247 | * @var int|null |
||
| 248 | * |
||
| 249 | * @ORM\Column(nullable=true, type="integer") |
||
| 250 | */ |
||
| 251 | protected $stockLimit; |
||
| 252 | |||
| 253 | /** |
||
| 254 | * @var int|null |
||
| 255 | * |
||
| 256 | * @ORM\Column(nullable=true, type="integer") |
||
| 257 | */ |
||
| 258 | protected $typeId; |
||
| 259 | |||
| 260 | /** |
||
| 261 | * @var \DateTimeImmutable|null |
||
| 262 | * |
||
| 263 | * @ORM\Column(nullable=true, type="datetime_immutable", options={"comment"="Updated info from Dandomain"}) |
||
| 264 | */ |
||
| 265 | protected $updated; |
||
| 266 | |||
| 267 | /** |
||
| 268 | * @var string|null |
||
| 269 | * |
||
| 270 | * @ORM\Column(nullable=true, type="string", length=191, options={"comment"="Updated by info from Dandomain"}) |
||
| 271 | */ |
||
| 272 | protected $updatedBy; |
||
| 273 | |||
| 274 | /** |
||
| 275 | * @var array|null |
||
| 276 | * |
||
| 277 | * @ORM\Column(nullable=true, type="json") |
||
| 278 | */ |
||
| 279 | protected $variantGroupIdList; |
||
| 280 | |||
| 281 | /** |
||
| 282 | * @var array|null |
||
| 283 | * |
||
| 284 | * @ORM\Column(nullable=true, type="json") |
||
| 285 | */ |
||
| 286 | protected $variantIdList; |
||
| 287 | |||
| 288 | /** |
||
| 289 | * @var int|null |
||
| 290 | * |
||
| 291 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 292 | */ |
||
| 293 | protected $variantMasterId; |
||
| 294 | |||
| 295 | /** |
||
| 296 | * @var string|null |
||
| 297 | * |
||
| 298 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 299 | */ |
||
| 300 | protected $vendorNumber; |
||
| 301 | |||
| 302 | /** |
||
| 303 | * @var int|null |
||
| 304 | * |
||
| 305 | * @ORM\Column(nullable=true, type="integer") |
||
| 306 | */ |
||
| 307 | protected $weight; |
||
| 308 | |||
| 309 | /** |
||
| 310 | * @var Category[]|ArrayCollection |
||
| 311 | */ |
||
| 312 | protected $categories; |
||
| 313 | |||
| 314 | /** |
||
| 315 | * @var Variant[]|ArrayCollection |
||
| 316 | */ |
||
| 317 | protected $disabledVariants; |
||
| 318 | |||
| 319 | /** |
||
| 320 | * @var Manufacturer[]|ArrayCollection |
||
| 321 | * |
||
| 322 | * @ORM\JoinTable(name="ldf_product_manufacturer") |
||
| 323 | * @ORM\ManyToMany(cascade={"persist"}, inversedBy="products", targetEntity="Manufacturer") |
||
| 324 | */ |
||
| 325 | protected $manufacturers; |
||
| 326 | |||
| 327 | /** |
||
| 328 | * @var Medium[]|ArrayCollection |
||
| 329 | */ |
||
| 330 | protected $media; |
||
| 331 | |||
| 332 | /** |
||
| 333 | * @var Price[]|ArrayCollection |
||
| 334 | */ |
||
| 335 | protected $prices; |
||
| 336 | |||
| 337 | /** |
||
| 338 | * @var ProductRelation[]|ArrayCollection |
||
| 339 | */ |
||
| 340 | protected $productRelations; |
||
| 341 | |||
| 342 | /** |
||
| 343 | * @var ProductType |
||
| 344 | */ |
||
| 345 | protected $productType; |
||
| 346 | |||
| 347 | /** |
||
| 348 | * @var Segment[]|ArrayCollection |
||
| 349 | */ |
||
| 350 | protected $segments; |
||
| 351 | |||
| 352 | /** |
||
| 353 | * @var VariantGroup[]|ArrayCollection |
||
| 354 | * |
||
| 355 | * @ORM\JoinTable(name="ldf_product_variant_group") |
||
| 356 | * @ORM\ManyToMany(cascade={"persist"}, inversedBy="products", targetEntity="VariantGroup") |
||
| 357 | */ |
||
| 358 | protected $variantGroups; |
||
| 359 | |||
| 360 | /** |
||
| 361 | * @var Variant[]|ArrayCollection |
||
| 362 | */ |
||
| 363 | protected $variants; |
||
| 364 | |||
| 365 | /** |
||
| 366 | * This is the master for this product |
||
| 367 | * |
||
| 368 | * @var Product|null |
||
| 369 | * |
||
| 370 | * @ORM\ManyToOne(targetEntity="Product", inversedBy="children") |
||
| 371 | */ |
||
| 372 | protected $parent; |
||
| 373 | |||
| 374 | /** |
||
| 375 | * This is the children (i.e. variants) of this products |
||
| 376 | * |
||
| 377 | * @var Product[]|ArrayCollection |
||
| 378 | * |
||
| 379 | * @ORM\OneToMany(targetEntity="Product", mappedBy="parent") |
||
| 380 | */ |
||
| 381 | protected $children; |
||
| 382 | |||
| 383 | public function __construct() |
||
| 384 | { |
||
| 385 | $this->categories = new ArrayCollection(); |
||
| 386 | $this->disabledVariants = new ArrayCollection(); |
||
| 387 | $this->manufacturers = new ArrayCollection(); |
||
| 388 | $this->media = new ArrayCollection(); |
||
| 389 | $this->prices = new ArrayCollection(); |
||
| 390 | $this->productRelations = new ArrayCollection(); |
||
| 391 | $this->segments = new ArrayCollection(); |
||
| 392 | $this->variants = new ArrayCollection(); |
||
| 393 | $this->variantGroups = new ArrayCollection(); |
||
| 394 | $this->children = new ArrayCollection(); |
||
| 395 | } |
||
| 396 | |||
| 397 | public function hydrate(array $data, bool $useConversions = false, $scalarsOnly = true) |
||
| 398 | { |
||
| 399 | if (isset($data['created'])) { |
||
| 400 | $data['created'] = $this->getDateTimeFromJson($data['created']); |
||
| 401 | } |
||
| 402 | |||
| 403 | if (isset($data['updated'])) { |
||
| 404 | $data['updated'] = $this->getDateTimeFromJson($data['updated']); |
||
| 405 | } |
||
| 406 | |||
| 407 | parent::hydrate($data, $useConversions, $scalarsOnly); |
||
| 408 | } |
||
| 409 | |||
| 410 | /* |
||
| 411 | * Collection/relation methods |
||
| 412 | */ |
||
| 413 | |||
| 414 | public function addDisabledVariant(VariantInterface $variant) : ProductInterface |
||
| 415 | { |
||
| 416 | if (!$this->disabledVariants->contains($variant)) { |
||
| 417 | $this->disabledVariants->add($variant); |
||
| 418 | } |
||
| 419 | |||
| 420 | return $this; |
||
| 421 | } |
||
| 422 | |||
| 423 | public function addMedium(MediumInterface $medium) : ProductInterface |
||
| 424 | { |
||
| 425 | if (!$this->media->contains($medium)) { |
||
| 426 | $this->media->add($medium); |
||
| 427 | } |
||
| 428 | |||
| 429 | return $this; |
||
| 430 | } |
||
| 431 | |||
| 432 | public function addCategory(CategoryInterface $category) : ProductInterface |
||
| 433 | { |
||
| 434 | if (!$this->categories->contains($category)) { |
||
| 435 | $this->categories->add($category); |
||
| 436 | } |
||
| 437 | |||
| 438 | return $this; |
||
| 439 | } |
||
| 440 | |||
| 441 | public function addManufacturer(ManufacturerInterface $manufacturer) : ProductInterface |
||
| 442 | { |
||
| 443 | if (!$this->hasManufacturer($manufacturer)) { |
||
| 444 | $this->manufacturers->add($manufacturer); |
||
| 445 | } |
||
| 446 | |||
| 447 | return $this; |
||
| 448 | } |
||
| 449 | |||
| 450 | public function removeManufacturer(ManufacturerInterface $manufacturer) : bool |
||
| 451 | { |
||
| 452 | return $this->manufacturers->removeElement($manufacturer); |
||
| 453 | } |
||
| 454 | |||
| 455 | public function hasManufacturer(ManufacturerInterface $manufacturer) : bool |
||
| 456 | { |
||
| 457 | return $this->manufacturers->exists(function ($key, ManufacturerInterface $element) use ($manufacturer) { |
||
| 458 | return $element->getExternalId() === $manufacturer->getExternalId(); |
||
| 459 | }); |
||
| 460 | } |
||
| 461 | |||
| 462 | public function addVariantGroup(VariantGroupInterface $variantGroup) : ProductInterface |
||
| 463 | { |
||
| 464 | if (!$this->hasVariantGroup($variantGroup)) { |
||
| 465 | $this->variantGroups->add($variantGroup); |
||
| 466 | } |
||
| 467 | |||
| 468 | return $this; |
||
| 469 | } |
||
| 470 | |||
| 471 | public function removeVariantGroup(VariantGroupInterface $variantGroup) : bool |
||
| 472 | { |
||
| 473 | return $this->variantGroups->removeElement($variantGroup); |
||
| 474 | } |
||
| 475 | |||
| 476 | public function hasVariantGroup($variantGroup) : bool |
||
| 484 | }); |
||
| 485 | } |
||
| 486 | |||
| 487 | public function addPrice(PriceInterface $price) : ProductInterface |
||
| 488 | { |
||
| 489 | if (!$this->prices->contains($price)) { |
||
| 490 | $this->prices->add($price); |
||
| 491 | } |
||
| 492 | |||
| 493 | return $this; |
||
| 494 | } |
||
| 495 | |||
| 496 | public function addProductRelation(ProductRelationInterface $productRelation) : ProductInterface |
||
| 497 | { |
||
| 498 | if (!$this->productRelations->contains($productRelation)) { |
||
| 499 | $this->productRelations->add($productRelation); |
||
| 500 | } |
||
| 501 | |||
| 502 | return $this; |
||
| 503 | } |
||
| 504 | |||
| 505 | public function addSegment(SegmentInterface $segment) : ProductInterface |
||
| 512 | } |
||
| 513 | |||
| 514 | public function addVariant(VariantInterface $variant) : ProductInterface |
||
| 515 | { |
||
| 516 | if (!$this->variants->contains($variant)) { |
||
| 517 | $this->variants->add($variant); |
||
| 518 | } |
||
| 519 | |||
| 520 | return $this; |
||
| 521 | } |
||
| 522 | |||
| 523 | public function addChild(ProductInterface $product) : ProductInterface |
||
| 524 | { |
||
| 525 | if (!$this->hasChild($product)) { |
||
| 526 | $this->children->add($product); |
||
| 527 | $product->setParent($this); |
||
| 528 | } |
||
| 529 | |||
| 530 | return $this; |
||
| 531 | } |
||
| 532 | |||
| 533 | public function removeChild(ProductInterface $product) : bool |
||
| 534 | { |
||
| 535 | $product->setParent(null); |
||
| 536 | return $this->children->removeElement($product); |
||
| 537 | } |
||
| 538 | |||
| 539 | public function hasChild($product) : bool |
||
| 540 | { |
||
| 541 | if($product instanceof ProductInterface) { |
||
| 542 | $product = $product->getExternalId(); |
||
| 543 | } |
||
| 544 | |||
| 545 | return $this->children->exists(function ($key, ProductInterface $element) use ($product) { |
||
| 546 | return $element->getExternalId() === $product; |
||
| 547 | }); |
||
| 548 | } |
||
| 549 | |||
| 550 | /* |
||
| 551 | * Getters / Setters |
||
| 552 | */ |
||
| 553 | /** |
||
| 554 | * @return int |
||
| 555 | */ |
||
| 556 | public function getId(): int |
||
| 557 | { |
||
| 558 | return (int)$this->id; |
||
| 559 | } |
||
| 560 | |||
| 561 | /** |
||
| 562 | * @param int $id |
||
| 563 | * @return ProductInterface |
||
| 564 | */ |
||
| 565 | public function setId(int $id) |
||
| 566 | { |
||
| 567 | $this->id = $id; |
||
| 568 | return $this; |
||
| 569 | } |
||
| 570 | |||
| 571 | /** |
||
| 572 | * @return int |
||
| 573 | */ |
||
| 574 | public function getExternalId(): int |
||
| 575 | { |
||
| 576 | return (int)$this->externalId; |
||
| 577 | } |
||
| 578 | |||
| 579 | /** |
||
| 580 | * @param int $externalId |
||
| 581 | * @return ProductInterface |
||
| 582 | */ |
||
| 583 | public function setExternalId(int $externalId) |
||
| 584 | { |
||
| 585 | $this->externalId = $externalId; |
||
| 586 | return $this; |
||
| 587 | } |
||
| 588 | |||
| 589 | /** |
||
| 590 | * @return null|string |
||
| 591 | */ |
||
| 592 | public function getBarCodeNumber() |
||
| 593 | { |
||
| 594 | return $this->barCodeNumber; |
||
| 595 | } |
||
| 596 | |||
| 597 | /** |
||
| 598 | * @param null|string $barCodeNumber |
||
| 599 | * @return ProductInterface |
||
| 600 | */ |
||
| 601 | public function setBarCodeNumber($barCodeNumber) |
||
| 602 | { |
||
| 603 | $this->barCodeNumber = $barCodeNumber; |
||
| 604 | return $this; |
||
| 605 | } |
||
| 606 | |||
| 607 | /** |
||
| 608 | * @return array|null |
||
| 609 | */ |
||
| 610 | public function getCategoryIdList() |
||
| 611 | { |
||
| 612 | return $this->categoryIdList; |
||
| 613 | } |
||
| 614 | |||
| 615 | /** |
||
| 616 | * @param array|null $categoryIdList |
||
| 617 | * @return ProductInterface |
||
| 618 | */ |
||
| 619 | public function setCategoryIdList($categoryIdList) |
||
| 620 | { |
||
| 621 | $this->categoryIdList = $categoryIdList; |
||
| 622 | return $this; |
||
| 623 | } |
||
| 624 | |||
| 625 | /** |
||
| 626 | * @return null|string |
||
| 627 | */ |
||
| 628 | public function getComments() |
||
| 629 | { |
||
| 630 | return $this->comments; |
||
| 631 | } |
||
| 632 | |||
| 633 | /** |
||
| 634 | * @param null|string $comments |
||
| 635 | * @return ProductInterface |
||
| 636 | */ |
||
| 637 | public function setComments($comments) |
||
| 638 | { |
||
| 639 | $this->comments = $comments; |
||
| 640 | return $this; |
||
| 641 | } |
||
| 642 | |||
| 643 | /** |
||
| 644 | * @return float|null |
||
| 645 | */ |
||
| 646 | public function getCostPrice() |
||
| 647 | { |
||
| 648 | return $this->costPrice; |
||
| 649 | } |
||
| 650 | |||
| 651 | /** |
||
| 652 | * @param float|null $costPrice |
||
| 653 | * @return ProductInterface |
||
| 654 | */ |
||
| 655 | public function setCostPrice($costPrice) |
||
| 656 | { |
||
| 657 | $this->costPrice = $costPrice; |
||
| 658 | return $this; |
||
| 659 | } |
||
| 660 | |||
| 661 | /** |
||
| 662 | * @return \DateTimeImmutable|null |
||
| 663 | */ |
||
| 664 | public function getCreated() |
||
| 665 | { |
||
| 666 | return $this->created; |
||
| 667 | } |
||
| 668 | |||
| 669 | /** |
||
| 670 | * @param \DateTimeImmutable|null $created |
||
| 671 | * @return ProductInterface |
||
| 672 | */ |
||
| 673 | public function setCreated($created) |
||
| 674 | { |
||
| 675 | $this->created = $created; |
||
| 676 | return $this; |
||
| 677 | } |
||
| 678 | |||
| 679 | /** |
||
| 680 | * @return null|string |
||
| 681 | */ |
||
| 682 | public function getCreatedBy() |
||
| 683 | { |
||
| 684 | return $this->createdBy; |
||
| 685 | } |
||
| 686 | |||
| 687 | /** |
||
| 688 | * @param null|string $createdBy |
||
| 689 | * @return ProductInterface |
||
| 690 | */ |
||
| 691 | public function setCreatedBy($createdBy) |
||
| 692 | { |
||
| 693 | $this->createdBy = $createdBy; |
||
| 694 | return $this; |
||
| 695 | } |
||
| 696 | |||
| 697 | /** |
||
| 698 | * @return int|null |
||
| 699 | */ |
||
| 700 | public function getDefaultCategoryId() |
||
| 701 | { |
||
| 702 | return $this->defaultCategoryId; |
||
| 703 | } |
||
| 704 | |||
| 705 | /** |
||
| 706 | * @param int|null $defaultCategoryId |
||
| 707 | * @return ProductInterface |
||
| 708 | */ |
||
| 709 | public function setDefaultCategoryId($defaultCategoryId) |
||
| 710 | { |
||
| 711 | $this->defaultCategoryId = $defaultCategoryId; |
||
| 712 | return $this; |
||
| 713 | } |
||
| 714 | |||
| 715 | /** |
||
| 716 | * @return array|null |
||
| 717 | */ |
||
| 718 | public function getDisabledVariantIdList() |
||
| 719 | { |
||
| 720 | return $this->disabledVariantIdList; |
||
| 721 | } |
||
| 722 | |||
| 723 | /** |
||
| 724 | * @param array|null $disabledVariantIdList |
||
| 725 | * @return ProductInterface |
||
| 726 | */ |
||
| 727 | public function setDisabledVariantIdList($disabledVariantIdList) |
||
| 728 | { |
||
| 729 | $this->disabledVariantIdList = $disabledVariantIdList; |
||
| 730 | return $this; |
||
| 731 | } |
||
| 732 | |||
| 733 | /** |
||
| 734 | * @return null|string |
||
| 735 | */ |
||
| 736 | public function getEdbPriserProductNumber() |
||
| 737 | { |
||
| 738 | return $this->edbPriserProductNumber; |
||
| 739 | } |
||
| 740 | |||
| 741 | /** |
||
| 742 | * @param null|string $edbPriserProductNumber |
||
| 743 | * @return ProductInterface |
||
| 744 | */ |
||
| 745 | public function setEdbPriserProductNumber($edbPriserProductNumber) |
||
| 746 | { |
||
| 747 | $this->edbPriserProductNumber = $edbPriserProductNumber; |
||
| 748 | return $this; |
||
| 749 | } |
||
| 750 | |||
| 751 | /** |
||
| 752 | * @return null|string |
||
| 753 | */ |
||
| 754 | public function getFileSaleLink() |
||
| 755 | { |
||
| 756 | return $this->fileSaleLink; |
||
| 757 | } |
||
| 758 | |||
| 759 | /** |
||
| 760 | * @param null|string $fileSaleLink |
||
| 761 | * @return ProductInterface |
||
| 762 | */ |
||
| 763 | public function setFileSaleLink($fileSaleLink) |
||
| 764 | { |
||
| 765 | $this->fileSaleLink = $fileSaleLink; |
||
| 766 | return $this; |
||
| 767 | } |
||
| 768 | |||
| 769 | /** |
||
| 770 | * @return null|string |
||
| 771 | */ |
||
| 772 | public function getGoogleFeedCategory() |
||
| 773 | { |
||
| 774 | return $this->googleFeedCategory; |
||
| 775 | } |
||
| 776 | |||
| 777 | /** |
||
| 778 | * @param null|string $googleFeedCategory |
||
| 779 | * @return ProductInterface |
||
| 780 | */ |
||
| 781 | public function setGoogleFeedCategory($googleFeedCategory) |
||
| 782 | { |
||
| 783 | $this->googleFeedCategory = $googleFeedCategory; |
||
| 784 | return $this; |
||
| 785 | } |
||
| 786 | |||
| 787 | /** |
||
| 788 | * @return bool|null |
||
| 789 | */ |
||
| 790 | public function getIsGiftCertificate() |
||
| 791 | { |
||
| 792 | return $this->isGiftCertificate; |
||
| 793 | } |
||
| 794 | |||
| 795 | /** |
||
| 796 | * @param bool|null $isGiftCertificate |
||
| 797 | * @return ProductInterface |
||
| 798 | */ |
||
| 799 | public function setIsGiftCertificate($isGiftCertificate) |
||
| 800 | { |
||
| 801 | $this->isGiftCertificate = $isGiftCertificate; |
||
| 802 | return $this; |
||
| 803 | } |
||
| 804 | |||
| 805 | /** |
||
| 806 | * @return bool|null |
||
| 807 | */ |
||
| 808 | public function getIsModified() |
||
| 809 | { |
||
| 810 | return $this->isModified; |
||
| 811 | } |
||
| 812 | |||
| 813 | /** |
||
| 814 | * @param bool|null $isModified |
||
| 815 | * @return ProductInterface |
||
| 816 | */ |
||
| 817 | public function setIsModified($isModified) |
||
| 818 | { |
||
| 819 | $this->isModified = $isModified; |
||
| 820 | return $this; |
||
| 821 | } |
||
| 822 | |||
| 823 | /** |
||
| 824 | * @return bool|null |
||
| 825 | */ |
||
| 826 | public function getIsRateVariants() |
||
| 827 | { |
||
| 828 | return $this->isRateVariants; |
||
| 829 | } |
||
| 830 | |||
| 831 | /** |
||
| 832 | * @param bool|null $isRateVariants |
||
| 833 | * @return ProductInterface |
||
| 834 | */ |
||
| 835 | public function setIsRateVariants($isRateVariants) |
||
| 836 | { |
||
| 837 | $this->isRateVariants = $isRateVariants; |
||
| 838 | return $this; |
||
| 839 | } |
||
| 840 | |||
| 841 | /** |
||
| 842 | * @return bool|null |
||
| 843 | */ |
||
| 844 | public function getIsReviewVariants() |
||
| 845 | { |
||
| 846 | return $this->isReviewVariants; |
||
| 847 | } |
||
| 848 | |||
| 849 | /** |
||
| 850 | * @param bool|null $isReviewVariants |
||
| 851 | * @return ProductInterface |
||
| 852 | */ |
||
| 853 | public function setIsReviewVariants($isReviewVariants) |
||
| 854 | { |
||
| 855 | $this->isReviewVariants = $isReviewVariants; |
||
| 856 | return $this; |
||
| 857 | } |
||
| 858 | |||
| 859 | /** |
||
| 860 | * @return bool|null |
||
| 861 | */ |
||
| 862 | public function getIsVariantMaster() |
||
| 863 | { |
||
| 864 | return $this->isVariantMaster; |
||
| 865 | } |
||
| 866 | |||
| 867 | /** |
||
| 868 | * @param bool|null $isVariantMaster |
||
| 869 | * @return ProductInterface |
||
| 870 | */ |
||
| 871 | public function setIsVariantMaster($isVariantMaster) |
||
| 872 | { |
||
| 873 | $this->isVariantMaster = $isVariantMaster; |
||
| 874 | return $this; |
||
| 875 | } |
||
| 876 | |||
| 877 | /** |
||
| 878 | * @return null|string |
||
| 879 | */ |
||
| 880 | public function getLocationNumber() |
||
| 881 | { |
||
| 882 | return $this->locationNumber; |
||
| 883 | } |
||
| 884 | |||
| 885 | /** |
||
| 886 | * @param null|string $locationNumber |
||
| 887 | * @return ProductInterface |
||
| 888 | */ |
||
| 889 | public function setLocationNumber($locationNumber) |
||
| 890 | { |
||
| 891 | $this->locationNumber = $locationNumber; |
||
| 892 | return $this; |
||
| 893 | } |
||
| 894 | |||
| 895 | /** |
||
| 896 | * @return array|null |
||
| 897 | */ |
||
| 898 | public function getManufacturereIdList() |
||
| 899 | { |
||
| 900 | return $this->manufacturereIdList; |
||
| 901 | } |
||
| 902 | |||
| 903 | /** |
||
| 904 | * @param array|null $manufacturereIdList |
||
| 905 | * @return ProductInterface |
||
| 906 | */ |
||
| 907 | public function setManufacturereIdList($manufacturereIdList) |
||
| 908 | { |
||
| 909 | $this->manufacturereIdList = $manufacturereIdList; |
||
| 910 | return $this; |
||
| 911 | } |
||
| 912 | |||
| 913 | /** |
||
| 914 | * @return int|null |
||
| 915 | */ |
||
| 916 | public function getMaxBuyAmount() |
||
| 917 | { |
||
| 918 | return $this->maxBuyAmount; |
||
| 919 | } |
||
| 920 | |||
| 921 | /** |
||
| 922 | * @param int|null $maxBuyAmount |
||
| 923 | * @return ProductInterface |
||
| 924 | */ |
||
| 925 | public function setMaxBuyAmount($maxBuyAmount) |
||
| 929 | } |
||
| 930 | |||
| 931 | /** |
||
| 932 | * @return int|null |
||
| 933 | */ |
||
| 934 | public function getMinBuyAmount() |
||
| 935 | { |
||
| 936 | return $this->minBuyAmount; |
||
| 937 | } |
||
| 938 | |||
| 939 | /** |
||
| 940 | * @param int|null $minBuyAmount |
||
| 941 | * @return ProductInterface |
||
| 942 | */ |
||
| 943 | public function setMinBuyAmount($minBuyAmount) |
||
| 944 | { |
||
| 945 | $this->minBuyAmount = $minBuyAmount; |
||
| 946 | return $this; |
||
| 947 | } |
||
| 948 | |||
| 949 | /** |
||
| 950 | * @return int|null |
||
| 951 | */ |
||
| 952 | public function getMinBuyAmountB2B() |
||
| 953 | { |
||
| 954 | return $this->minBuyAmountB2B; |
||
| 955 | } |
||
| 956 | |||
| 957 | /** |
||
| 958 | * @param int|null $minBuyAmountB2B |
||
| 959 | * @return ProductInterface |
||
| 960 | */ |
||
| 961 | public function setMinBuyAmountB2B($minBuyAmountB2B) |
||
| 962 | { |
||
| 963 | $this->minBuyAmountB2B = $minBuyAmountB2B; |
||
| 964 | return $this; |
||
| 965 | } |
||
| 966 | |||
| 967 | /** |
||
| 968 | * @return null|string |
||
| 969 | */ |
||
| 970 | public function getNumber() |
||
| 971 | { |
||
| 972 | return $this->number; |
||
| 973 | } |
||
| 974 | |||
| 975 | /** |
||
| 976 | * @param null|string $number |
||
| 977 | * @return ProductInterface |
||
| 978 | */ |
||
| 979 | public function setNumber($number) |
||
| 980 | { |
||
| 981 | $this->number = $number; |
||
| 982 | return $this; |
||
| 983 | } |
||
| 984 | |||
| 985 | /** |
||
| 986 | * @return null|string |
||
| 987 | */ |
||
| 988 | public function getPicture() |
||
| 989 | { |
||
| 990 | return $this->picture; |
||
| 991 | } |
||
| 992 | |||
| 993 | /** |
||
| 994 | * @param null|string $picture |
||
| 995 | * @return ProductInterface |
||
| 996 | */ |
||
| 997 | public function setPicture($picture) |
||
| 998 | { |
||
| 999 | $this->picture = $picture; |
||
| 1000 | return $this; |
||
| 1001 | } |
||
| 1002 | |||
| 1003 | /** |
||
| 1004 | * @return int|null |
||
| 1005 | */ |
||
| 1006 | public function getSalesCount() |
||
| 1007 | { |
||
| 1008 | return $this->salesCount; |
||
| 1009 | } |
||
| 1010 | |||
| 1011 | /** |
||
| 1012 | * @param int|null $salesCount |
||
| 1013 | * @return ProductInterface |
||
| 1014 | */ |
||
| 1015 | public function setSalesCount($salesCount) |
||
| 1016 | { |
||
| 1017 | $this->salesCount = $salesCount; |
||
| 1018 | return $this; |
||
| 1019 | } |
||
| 1020 | |||
| 1021 | /** |
||
| 1022 | * @return array|null |
||
| 1023 | */ |
||
| 1024 | public function getSegmentIdList() |
||
| 1025 | { |
||
| 1026 | return $this->segmentIdList; |
||
| 1027 | } |
||
| 1028 | |||
| 1029 | /** |
||
| 1030 | * @param array|null $segmentIdList |
||
| 1031 | * @return ProductInterface |
||
| 1032 | */ |
||
| 1033 | public function setSegmentIdList($segmentIdList) |
||
| 1034 | { |
||
| 1035 | $this->segmentIdList = $segmentIdList; |
||
| 1036 | return $this; |
||
| 1037 | } |
||
| 1038 | |||
| 1039 | /** |
||
| 1040 | * @return int|null |
||
| 1041 | */ |
||
| 1042 | public function getSortOrder() |
||
| 1043 | { |
||
| 1044 | return $this->sortOrder; |
||
| 1045 | } |
||
| 1046 | |||
| 1047 | /** |
||
| 1048 | * @param int|null $sortOrder |
||
| 1049 | * @return ProductInterface |
||
| 1050 | */ |
||
| 1051 | public function setSortOrder($sortOrder) |
||
| 1052 | { |
||
| 1053 | $this->sortOrder = $sortOrder; |
||
| 1054 | return $this; |
||
| 1055 | } |
||
| 1056 | |||
| 1057 | /** |
||
| 1058 | * @return int|null |
||
| 1059 | */ |
||
| 1060 | public function getStockCount() |
||
| 1061 | { |
||
| 1062 | return $this->stockCount; |
||
| 1063 | } |
||
| 1064 | |||
| 1065 | /** |
||
| 1066 | * @param int|null $stockCount |
||
| 1067 | * @return ProductInterface |
||
| 1068 | */ |
||
| 1069 | public function setStockCount($stockCount) |
||
| 1070 | { |
||
| 1071 | $this->stockCount = $stockCount; |
||
| 1072 | return $this; |
||
| 1073 | } |
||
| 1074 | |||
| 1075 | /** |
||
| 1076 | * @return int|null |
||
| 1077 | */ |
||
| 1078 | public function getStockLimit() |
||
| 1079 | { |
||
| 1080 | return $this->stockLimit; |
||
| 1081 | } |
||
| 1082 | |||
| 1083 | /** |
||
| 1084 | * @param int|null $stockLimit |
||
| 1085 | * @return ProductInterface |
||
| 1086 | */ |
||
| 1087 | public function setStockLimit($stockLimit) |
||
| 1088 | { |
||
| 1089 | $this->stockLimit = $stockLimit; |
||
| 1090 | return $this; |
||
| 1091 | } |
||
| 1092 | |||
| 1093 | /** |
||
| 1094 | * @return int|null |
||
| 1095 | */ |
||
| 1096 | public function getTypeId() |
||
| 1097 | { |
||
| 1098 | return $this->typeId; |
||
| 1099 | } |
||
| 1100 | |||
| 1101 | /** |
||
| 1102 | * @param int|null $typeId |
||
| 1103 | * @return ProductInterface |
||
| 1104 | */ |
||
| 1105 | public function setTypeId($typeId) |
||
| 1106 | { |
||
| 1107 | $this->typeId = $typeId; |
||
| 1108 | return $this; |
||
| 1109 | } |
||
| 1110 | |||
| 1111 | /** |
||
| 1112 | * @return \DateTimeImmutable|null |
||
| 1113 | */ |
||
| 1114 | public function getUpdated() |
||
| 1115 | { |
||
| 1116 | return $this->updated; |
||
| 1117 | } |
||
| 1118 | |||
| 1119 | /** |
||
| 1120 | * @param \DateTimeImmutable|null $updated |
||
| 1121 | * @return ProductInterface |
||
| 1122 | */ |
||
| 1123 | public function setUpdated($updated) |
||
| 1124 | { |
||
| 1125 | $this->updated = $updated; |
||
| 1126 | return $this; |
||
| 1127 | } |
||
| 1128 | |||
| 1129 | /** |
||
| 1130 | * @return null|string |
||
| 1131 | */ |
||
| 1132 | public function getUpdatedBy() |
||
| 1133 | { |
||
| 1134 | return $this->updatedBy; |
||
| 1135 | } |
||
| 1136 | |||
| 1137 | /** |
||
| 1138 | * @param null|string $updatedBy |
||
| 1139 | * @return ProductInterface |
||
| 1140 | */ |
||
| 1141 | public function setUpdatedBy($updatedBy) |
||
| 1142 | { |
||
| 1143 | $this->updatedBy = $updatedBy; |
||
| 1144 | return $this; |
||
| 1145 | } |
||
| 1146 | |||
| 1147 | /** |
||
| 1148 | * @return array|null |
||
| 1149 | */ |
||
| 1150 | public function getVariantGroupIdList() |
||
| 1151 | { |
||
| 1152 | return $this->variantGroupIdList; |
||
| 1153 | } |
||
| 1154 | |||
| 1155 | /** |
||
| 1156 | * @param array|null $variantGroupIdList |
||
| 1157 | * @return ProductInterface |
||
| 1158 | */ |
||
| 1159 | public function setVariantGroupIdList($variantGroupIdList) |
||
| 1160 | { |
||
| 1161 | $this->variantGroupIdList = $variantGroupIdList; |
||
| 1162 | return $this; |
||
| 1163 | } |
||
| 1164 | |||
| 1165 | /** |
||
| 1166 | * @return array|null |
||
| 1167 | */ |
||
| 1168 | public function getVariantIdList() |
||
| 1169 | { |
||
| 1170 | return $this->variantIdList; |
||
| 1171 | } |
||
| 1172 | |||
| 1173 | /** |
||
| 1174 | * @param array|null $variantIdList |
||
| 1175 | * @return ProductInterface |
||
| 1176 | */ |
||
| 1177 | public function setVariantIdList($variantIdList) |
||
| 1178 | { |
||
| 1179 | $this->variantIdList = $variantIdList; |
||
| 1180 | return $this; |
||
| 1181 | } |
||
| 1182 | |||
| 1183 | /** |
||
| 1184 | * @return int|null |
||
| 1185 | */ |
||
| 1186 | public function getVariantMasterId() |
||
| 1187 | { |
||
| 1188 | return $this->variantMasterId; |
||
| 1189 | } |
||
| 1190 | |||
| 1191 | /** |
||
| 1192 | * @param int|null $variantMasterId |
||
| 1193 | * @return ProductInterface |
||
| 1194 | */ |
||
| 1195 | public function setVariantMasterId($variantMasterId) |
||
| 1196 | { |
||
| 1197 | $this->variantMasterId = $variantMasterId; |
||
| 1198 | return $this; |
||
| 1199 | } |
||
| 1200 | |||
| 1201 | /** |
||
| 1202 | * @return null|string |
||
| 1203 | */ |
||
| 1204 | public function getVendorNumber() |
||
| 1205 | { |
||
| 1206 | return $this->vendorNumber; |
||
| 1207 | } |
||
| 1208 | |||
| 1209 | /** |
||
| 1210 | * @param null|string $vendorNumber |
||
| 1211 | * @return ProductInterface |
||
| 1212 | */ |
||
| 1213 | public function setVendorNumber($vendorNumber) |
||
| 1214 | { |
||
| 1215 | $this->vendorNumber = $vendorNumber; |
||
| 1216 | return $this; |
||
| 1217 | } |
||
| 1218 | |||
| 1219 | /** |
||
| 1220 | * @return int|null |
||
| 1221 | */ |
||
| 1222 | public function getWeight() |
||
| 1223 | { |
||
| 1224 | return $this->weight; |
||
| 1225 | } |
||
| 1226 | |||
| 1227 | /** |
||
| 1228 | * @param int|null $weight |
||
| 1229 | * @return ProductInterface |
||
| 1230 | */ |
||
| 1231 | public function setWeight($weight) |
||
| 1232 | { |
||
| 1233 | $this->weight = $weight; |
||
| 1234 | return $this; |
||
| 1235 | } |
||
| 1236 | |||
| 1237 | /** |
||
| 1238 | * @return ArrayCollection|Category[] |
||
| 1239 | */ |
||
| 1240 | public function getCategories() |
||
| 1241 | { |
||
| 1242 | return $this->categories; |
||
| 1243 | } |
||
| 1244 | |||
| 1245 | /** |
||
| 1246 | * @param ArrayCollection|Category[] $categories |
||
| 1247 | * @return ProductInterface |
||
| 1248 | */ |
||
| 1249 | public function setCategories($categories) |
||
| 1250 | { |
||
| 1251 | $this->categories = $categories; |
||
| 1252 | return $this; |
||
| 1253 | } |
||
| 1254 | |||
| 1255 | /** |
||
| 1256 | * @return ArrayCollection|Variant[] |
||
| 1257 | */ |
||
| 1258 | public function getDisabledVariants() |
||
| 1259 | { |
||
| 1260 | return $this->disabledVariants; |
||
| 1261 | } |
||
| 1262 | |||
| 1263 | /** |
||
| 1264 | * @param ArrayCollection|Variant[] $disabledVariants |
||
| 1265 | * @return ProductInterface |
||
| 1266 | */ |
||
| 1267 | public function setDisabledVariants($disabledVariants) |
||
| 1268 | { |
||
| 1269 | $this->disabledVariants = $disabledVariants; |
||
| 1270 | return $this; |
||
| 1271 | } |
||
| 1272 | |||
| 1273 | /** |
||
| 1274 | * @return ArrayCollection|Manufacturer[] |
||
| 1275 | */ |
||
| 1276 | public function getManufacturers() |
||
| 1277 | { |
||
| 1278 | return $this->manufacturers; |
||
| 1279 | } |
||
| 1280 | |||
| 1281 | /** |
||
| 1282 | * @param ArrayCollection|Manufacturer[] $manufacturers |
||
| 1283 | * @return ProductInterface |
||
| 1284 | */ |
||
| 1285 | public function setManufacturers($manufacturers) |
||
| 1289 | } |
||
| 1290 | |||
| 1291 | /** |
||
| 1292 | * @return ArrayCollection|Medium[] |
||
| 1293 | */ |
||
| 1294 | public function getMedia() |
||
| 1295 | { |
||
| 1296 | return $this->media; |
||
| 1297 | } |
||
| 1298 | |||
| 1299 | /** |
||
| 1300 | * @param ArrayCollection|Medium[] $media |
||
| 1301 | * @return ProductInterface |
||
| 1302 | */ |
||
| 1303 | public function setMedia($media) |
||
| 1304 | { |
||
| 1305 | $this->media = $media; |
||
| 1306 | return $this; |
||
| 1307 | } |
||
| 1308 | |||
| 1309 | /** |
||
| 1310 | * @return ArrayCollection|Price[] |
||
| 1311 | */ |
||
| 1312 | public function getPrices() |
||
| 1313 | { |
||
| 1314 | return $this->prices; |
||
| 1315 | } |
||
| 1316 | |||
| 1317 | /** |
||
| 1318 | * @param ArrayCollection|Price[] $prices |
||
| 1319 | * @return ProductInterface |
||
| 1320 | */ |
||
| 1321 | public function setPrices($prices) |
||
| 1325 | } |
||
| 1326 | |||
| 1327 | /** |
||
| 1328 | * @return ArrayCollection|ProductRelation[] |
||
| 1329 | */ |
||
| 1330 | public function getProductRelations() |
||
| 1331 | { |
||
| 1332 | return $this->productRelations; |
||
| 1333 | } |
||
| 1334 | |||
| 1335 | /** |
||
| 1336 | * @param ArrayCollection|ProductRelation[] $productRelations |
||
| 1337 | * @return ProductInterface |
||
| 1338 | */ |
||
| 1339 | public function setProductRelations($productRelations) |
||
| 1340 | { |
||
| 1341 | $this->productRelations = $productRelations; |
||
| 1342 | return $this; |
||
| 1343 | } |
||
| 1344 | |||
| 1345 | /** |
||
| 1346 | * @return ProductTypeInterface |
||
| 1347 | */ |
||
| 1348 | public function getProductType(): ProductTypeInterface |
||
| 1349 | { |
||
| 1350 | return $this->productType; |
||
| 1351 | } |
||
| 1352 | |||
| 1353 | /** |
||
| 1354 | * @param ProductType $productType |
||
| 1355 | * @return ProductInterface |
||
| 1356 | */ |
||
| 1357 | public function setProductType(ProductType $productType) |
||
| 1358 | { |
||
| 1359 | $this->productType = $productType; |
||
| 1360 | return $this; |
||
| 1361 | } |
||
| 1362 | |||
| 1363 | /** |
||
| 1364 | * @return ArrayCollection|Segment[] |
||
| 1365 | */ |
||
| 1366 | public function getSegments() |
||
| 1367 | { |
||
| 1368 | return $this->segments; |
||
| 1369 | } |
||
| 1370 | |||
| 1371 | /** |
||
| 1372 | * @param ArrayCollection|Segment[] $segments |
||
| 1373 | * @return ProductInterface |
||
| 1374 | */ |
||
| 1375 | public function setSegments($segments) |
||
| 1376 | { |
||
| 1377 | $this->segments = $segments; |
||
| 1378 | return $this; |
||
| 1379 | } |
||
| 1380 | |||
| 1381 | /** |
||
| 1382 | * @return ArrayCollection|VariantGroup[] |
||
| 1383 | */ |
||
| 1384 | public function getVariantGroups() |
||
| 1385 | { |
||
| 1386 | return $this->variantGroups; |
||
| 1387 | } |
||
| 1388 | |||
| 1389 | /** |
||
| 1390 | * @param ArrayCollection|VariantGroup[] $variantGroups |
||
| 1391 | * @return ProductInterface |
||
| 1392 | */ |
||
| 1393 | public function setVariantGroups($variantGroups) |
||
| 1394 | { |
||
| 1395 | $this->variantGroups = $variantGroups; |
||
| 1396 | return $this; |
||
| 1397 | } |
||
| 1398 | |||
| 1399 | /** |
||
| 1400 | * @return ArrayCollection|Variant[] |
||
| 1401 | */ |
||
| 1402 | public function getVariants() |
||
| 1403 | { |
||
| 1404 | return $this->variants; |
||
| 1405 | } |
||
| 1406 | |||
| 1407 | /** |
||
| 1408 | * @param ArrayCollection|Variant[] $variants |
||
| 1409 | * @return ProductInterface |
||
| 1410 | */ |
||
| 1411 | public function setVariants($variants) |
||
| 1412 | { |
||
| 1413 | $this->variants = $variants; |
||
| 1414 | return $this; |
||
| 1415 | } |
||
| 1416 | |||
| 1417 | /** |
||
| 1418 | * @return Product|null |
||
| 1419 | */ |
||
| 1420 | public function getParent(): ?Product |
||
| 1423 | } |
||
| 1424 | |||
| 1425 | /** |
||
| 1426 | * @param Product|null $parent |
||
| 1427 | * @return Product |
||
| 1428 | */ |
||
| 1429 | public function setParent(?Product $parent) |
||
| 1430 | { |
||
| 1431 | $this->parent = $parent; |
||
| 1432 | return $this; |
||
| 1433 | } |
||
| 1434 | |||
| 1435 | /** |
||
| 1436 | * @return ArrayCollection|Product[] |
||
| 1437 | */ |
||
| 1438 | public function getChildren() |
||
| 1439 | { |
||
| 1440 | return $this->children; |
||
| 1441 | } |
||
| 1442 | |||
| 1443 | /** |
||
| 1444 | * @param ArrayCollection|Product[] $children |
||
| 1445 | * @return Product |
||
| 1446 | */ |
||
| 1447 | public function setChildren($children) |
||
| 1448 | { |
||
| 1449 | $this->children = $children; |
||
| 1450 | return $this; |
||
| 1451 | } |
||
| 1452 | } |
||
| 1453 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths