getIntersect($feedSettings['only_with_features'], $productFeatures); return !empty($list); } public function isNotExists($feedSettings, $productFeatures) { if (empty($feedSettings['only_without_features_status'])) { return true; } if (empty($feedSettings['only_without_features'])) { return true; } $list = $this->getIntersect($feedSettings['only_without_features'], $productFeatures); return empty($list); } protected function getIntersect($validFeatures, $productFeatures) { return array_intersect(explode(',', $validFeatures), $productFeatures); } }