3 declare(strict_types=1);
20 use DateTimeImmutable;
156 if (is_null($this->name)) {
158 $data = $this->
raw(self::FIELD_NAME);
159 if (is_null($data)) {
177 if (is_null($this->key)) {
179 $data = $this->
raw(self::FIELD_KEY);
180 if (is_null($data)) {
183 $this->key = (string) $data;
197 if (is_null($this->description)) {
199 $data = $this->
raw(self::FIELD_DESCRIPTION);
200 if (is_null($data)) {
218 if (is_null($this->value)) {
220 $data = $this->
raw(self::FIELD_VALUE);
221 if (is_null($data)) {
225 $this->value = $className::of($data);
239 if (is_null($this->cartPredicate)) {
241 $data = $this->
raw(self::FIELD_CART_PREDICATE);
242 if (is_null($data)) {
245 $this->cartPredicate = (string) $data;
260 if (is_null($this->target)) {
262 $data = $this->
raw(self::FIELD_TARGET);
263 if (is_null($data)) {
267 $this->target = $className::of($data);
283 if (is_null($this->sortOrder)) {
285 $data = $this->
raw(self::FIELD_SORT_ORDER);
286 if (is_null($data)) {
289 $this->sortOrder = (string) $data;
308 if (is_null($this->stores)) {
310 $data = $this->
raw(self::FIELD_STORES);
311 if (is_null($data)) {
329 if (is_null($this->isActive)) {
331 $data = $this->
raw(self::FIELD_IS_ACTIVE);
332 if (is_null($data)) {
335 $this->isActive = (bool) $data;
349 if (is_null($this->validFrom)) {
351 $data = $this->
raw(self::FIELD_VALID_FROM);
352 if (is_null($data)) {
356 if (
false === $data) {
359 $this->validFrom = $data;
373 if (is_null($this->validUntil)) {
375 $data = $this->
raw(self::FIELD_VALID_UNTIL);
376 if (is_null($data)) {
380 if (
false === $data) {
383 $this->validUntil = $data;
397 if (is_null($this->requiresDiscountCode)) {
399 $data = $this->
raw(self::FIELD_REQUIRES_DISCOUNT_CODE);
400 if (is_null($data)) {
403 $this->requiresDiscountCode = (bool) $data;
417 if (is_null($this->stackingMode)) {
419 $data = $this->
raw(self::FIELD_STACKING_MODE);
420 if (is_null($data)) {
423 $this->stackingMode = (string) $data;
437 if (is_null($this->custom)) {
439 $data = $this->
raw(self::FIELD_CUSTOM);
440 if (is_null($data)) {
564 #[\ReturnTypeWillChange]
575 return (
object) $data;