File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
app/code/Magento/CatalogRule/Model/Rule/Condition Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,9 @@ public function mapConditionsToSearchCriteria(CombinedCondition $conditions): Se
8282 */
8383 private function mapConditionToFilterGroup (ConditionInterface $ condition )
8484 {
85- if ($ condition-> getType () === CombinedCondition::class ) {
85+ if ($ condition instanceof CombinedCondition) {
8686 return $ this ->mapCombinedConditionToFilterGroup ($ condition );
87- } elseif ($ condition-> getType () === SimpleCondition::class ) {
87+ } elseif ($ condition instanceof SimpleCondition) {
8888 return $ this ->mapSimpleConditionToFilterGroup ($ condition );
8989 }
9090
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ private function rebuildCombinedCondition(CombinedCondition $originalConditions)
6767 $ invalidConditions = [];
6868
6969 foreach ($ originalConditions ->getConditions () as $ condition ) {
70- if ($ condition-> getType () === CombinedCondition::class ) {
70+ if ($ condition instanceof CombinedCondition) {
7171 $ rebuildSubCondition = $ this ->rebuildCombinedCondition ($ condition );
7272
7373 if (count ($ rebuildSubCondition ->getConditions ()) > 0 ) {
@@ -79,7 +79,7 @@ private function rebuildCombinedCondition(CombinedCondition $originalConditions)
7979 continue ;
8080 }
8181
82- if ($ condition-> getType () === SimpleCondition::class ) {
82+ if ($ condition instanceof SimpleCondition) {
8383 if ($ this ->validateSimpleCondition ($ condition )) {
8484 $ validConditions [] = $ condition ;
8585 } else {
You can’t perform that action at this time.
0 commit comments