41
41
* @method \Magento\CatalogRule\Model\Rule setFromDate(string $value)
42
42
* @method \Magento\CatalogRule\Model\Rule setToDate(string $value)
43
43
* @method \Magento\CatalogRule\Model\Rule setCustomerGroupIds(string $value)
44
+ * @method string getWebsiteIds()
44
45
* @method \Magento\CatalogRule\Model\Rule setWebsiteIds(string $value)
45
46
* @SuppressWarnings(PHPMD.TooManyFields)
46
47
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -432,9 +433,7 @@ protected function _getWebsitesMap()
432
433
}
433
434
434
435
/**
435
- * @inheritdoc
436
- * @param \Magento\Framework\DataObject $dataObject
437
- * @return bool|string[]
436
+ * {@inheritdoc}
438
437
*/
439
438
public function validateData (DataObject $ dataObject )
440
439
{
@@ -455,6 +454,7 @@ public function validateData(DataObject $dataObject)
455
454
*
456
455
* @param string $action
457
456
* @param string|int|float $discount
457
+ *
458
458
* @return array Validation errors
459
459
*/
460
460
protected function validateDiscount ($ action , $ discount )
@@ -582,7 +582,8 @@ protected function _invalidateCache()
582
582
}
583
583
584
584
/**
585
- * @inheritdoc
585
+ * {@inheritdoc}
586
+ *
586
587
* @return $this
587
588
*/
588
589
public function afterSave ()
@@ -612,7 +613,8 @@ public function reindex()
612
613
}
613
614
614
615
/**
615
- * @inheritdoc
616
+ * {@inheritdoc}
617
+ *
616
618
* @return $this
617
619
*/
618
620
public function afterDelete ()
@@ -641,9 +643,9 @@ public function isRuleBehaviorChanged()
641
643
642
644
/**
643
645
* Get array with data differences
644
- *
645
646
* @param array $array1
646
647
* @param array $array2
648
+ *
647
649
* @return array
648
650
*/
649
651
protected function dataDiff ($ array1 , $ array2 )
@@ -662,8 +664,6 @@ protected function dataDiff($array1, $array2)
662
664
}
663
665
664
666
/**
665
- * Get conditions field set id
666
- *
667
667
* @param string $formName
668
668
* @return string
669
669
*/
@@ -675,94 +675,79 @@ public function getConditionsFieldSetId($formName = '')
675
675
//@codeCoverageIgnoreStart
676
676
677
677
/**
678
- * @inheritdoc
679
- * @return int|null
678
+ * {@inheritdoc}
680
679
*/
681
680
public function getRuleId ()
682
681
{
683
682
return $ this ->getData (self ::RULE_ID );
684
683
}
685
684
686
685
/**
687
- * @inheritdoc
688
- * @param int $ruleId
689
- * @return $this
686
+ * {@inheritdoc}
690
687
*/
691
688
public function setRuleId ($ ruleId )
692
689
{
693
690
return $ this ->setData (self ::RULE_ID , $ ruleId );
694
691
}
695
692
696
693
/**
697
- * @inheritdoc
698
- * @return string
694
+ * {@inheritdoc}
699
695
*/
700
696
public function getName ()
701
697
{
702
698
return $ this ->getData (self ::NAME );
703
699
}
704
700
705
701
/**
706
- * @inheritdoc
707
- * @param string $name
708
- * @return $this
702
+ * {@inheritdoc}
709
703
*/
710
704
public function setName ($ name )
711
705
{
712
706
return $ this ->setData (self ::NAME , $ name );
713
707
}
714
708
715
709
/**
716
- * @inheritdoc
717
- * @return string|null
710
+ * {@inheritdoc}
718
711
*/
719
712
public function getDescription ()
720
713
{
721
714
return $ this ->getData (self ::DESCRIPTION );
722
715
}
723
716
724
717
/**
725
- * @inheritdoc
726
- * @param string $description
727
- * @return $this
718
+ * {@inheritdoc}
728
719
*/
729
720
public function setDescription ($ description )
730
721
{
731
722
return $ this ->setData (self ::DESCRIPTION , $ description );
732
723
}
733
724
734
725
/**
735
- * @inheritdoc
736
- * @return int
726
+ * {@inheritdoc}
737
727
*/
738
728
public function getIsActive ()
739
729
{
740
730
return $ this ->getData (self ::IS_ACTIVE );
741
731
}
742
732
743
733
/**
744
- * @inheritdoc
745
- * @param int $isActive
746
- * @return $this
734
+ * {@inheritdoc}
747
735
*/
748
736
public function setIsActive ($ isActive )
749
737
{
750
738
return $ this ->setData (self ::IS_ACTIVE , $ isActive );
751
739
}
752
740
753
741
/**
754
- * @inheritdoc
755
- * @return \Magento\CatalogRule\Api\Data\ConditionInterface|null
742
+ * {@inheritdoc}
756
743
*/
757
744
public function getRuleCondition ()
758
745
{
759
746
return $ this ->getRuleConditionConverter ()->arrayToDataModel ($ this ->getConditions ()->asArray ());
760
747
}
761
748
762
749
/**
763
- * @inheritdoc
764
- * @param \Magento\CatalogRule\Api\Data\ConditionInterface $condition
765
- * @return $this
750
+ * {@inheritdoc}
766
751
*/
767
752
public function setRuleCondition ($ condition )
768
753
{
@@ -773,84 +758,70 @@ public function setRuleCondition($condition)
773
758
}
774
759
775
760
/**
776
- * @inheritdoc
777
- * @return int|null
761
+ * {@inheritdoc}
778
762
*/
779
763
public function getStopRulesProcessing ()
780
764
{
781
765
return $ this ->getData (self ::STOP_RULES_PROCESSING );
782
766
}
783
767
784
768
/**
785
- * @inheritdoc
786
- * @param int $isStopProcessing
787
- * @return $this
769
+ * {@inheritdoc}
788
770
*/
789
771
public function setStopRulesProcessing ($ isStopProcessing )
790
772
{
791
773
return $ this ->setData (self ::STOP_RULES_PROCESSING , $ isStopProcessing );
792
774
}
793
775
794
776
/**
795
- * @inheritdoc
796
- * @return int|null
777
+ * {@inheritdoc}
797
778
*/
798
779
public function getSortOrder ()
799
780
{
800
781
return $ this ->getData (self ::SORT_ORDER );
801
782
}
802
783
803
784
/**
804
- * @inheritdoc
805
- * @param int $sortOrder
806
- * @return $this
785
+ * {@inheritdoc}
807
786
*/
808
787
public function setSortOrder ($ sortOrder )
809
788
{
810
789
return $ this ->setData (self ::SORT_ORDER , $ sortOrder );
811
790
}
812
791
813
792
/**
814
- * @inheritdoc
815
- * @return string
793
+ * {@inheritdoc}
816
794
*/
817
795
public function getSimpleAction ()
818
796
{
819
797
return $ this ->getData (self ::SIMPLE_ACTION );
820
798
}
821
799
822
800
/**
823
- * @inheritdoc
824
- * @param string $action
825
- * @return $this
801
+ * {@inheritdoc}
826
802
*/
827
803
public function setSimpleAction ($ action )
828
804
{
829
805
return $ this ->setData (self ::SIMPLE_ACTION , $ action );
830
806
}
831
807
832
808
/**
833
- * @inheritdoc
834
- * @return float
809
+ * {@inheritdoc}
835
810
*/
836
811
public function getDiscountAmount ()
837
812
{
838
813
return $ this ->getData (self ::DISCOUNT_AMOUNT );
839
814
}
840
815
841
816
/**
842
- * @inheritdoc
843
- * @param float $amount
844
- * @return $this
817
+ * {@inheritdoc}
845
818
*/
846
819
public function setDiscountAmount ($ amount )
847
820
{
848
821
return $ this ->setData (self ::DISCOUNT_AMOUNT , $ amount );
849
822
}
850
823
851
824
/**
852
- * Get from date
853
- *
854
825
* @return string
855
826
*/
856
827
public function getFromDate ()
@@ -859,8 +830,6 @@ public function getFromDate()
859
830
}
860
831
861
832
/**
862
- * Get to date
863
- *
864
833
* @return string
865
834
*/
866
835
public function getToDate ()
@@ -869,7 +838,8 @@ public function getToDate()
869
838
}
870
839
871
840
/**
872
- * @inheritdoc
841
+ * {@inheritdoc}
842
+ *
873
843
* @return \Magento\CatalogRule\Api\Data\RuleExtensionInterface|null
874
844
*/
875
845
public function getExtensionAttributes ()
@@ -878,7 +848,8 @@ public function getExtensionAttributes()
878
848
}
879
849
880
850
/**
881
- * @inheritdoc
851
+ * {@inheritdoc}
852
+ *
882
853
* @param \Magento\CatalogRule\Api\Data\RuleExtensionInterface $extensionAttributes
883
854
* @return $this
884
855
*/
@@ -888,8 +859,6 @@ public function setExtensionAttributes(RuleExtensionInterface $extensionAttribut
888
859
}
889
860
890
861
/**
891
- * Get rule condition converter
892
- *
893
862
* @return Data\Condition\Converter
894
863
* @deprecated 100.1.0
895
864
*/
0 commit comments