private static function getPlatformRestrictionsForCampaignFeed(
        $campaignFeed
    ) {
        $platformRestrictions = ExtensionSettingPlatform::NONE;

        if ($campaignFeed->getMatchingFunction()->getOperator() === FunctionOperator::AND_VALUE) {
            foreach ($campaignFeed->getMatchingFunction()->getLhsOperand() as $argument) {
                if ($argument instanceof FunctionOperand) {
                    if ($argument->getValue()->getOperator() === FunctionOperator::EQUALS
                        && $argument->getValue()->getLhsOperand()[0] instanceof RequestContextOperand) {
                        $requestContextOperand = $argument->getValue()->getLhsOperand()[0];
                        if ($requestContextOperand->getContextType()
                            === RequestContextOperandContextType::DEVICE_PLATFORM) {
                            $platformRestrictions = strtoupper(
                                $argument->getValue()->getRhsOperand()[0]->getStringValue()
                            );
                        }
                    }
                }
            }
        }

        return $platformRestrictions;
    }