private function updateCustomFeedbackValues($apnsFeedback, $feedback, $deviceTokens)
    {

        //Add failures amount based on apple feedback to our custom feedback
        $feedback['failure'] += count($apnsFeedback['apnsFeedback']);

        //apns tokens
        $apnsTokens = array_pluck($apnsFeedback['apnsFeedback'], 'devtoken');

        foreach ($deviceTokens as $token) {
            if (in_array($token, $apnsTokens)) {
                $feedback['success'] -= 1;
                $feedback['tokenFailList'][] = $token;
            }

        }

        return $feedback;
    }
private function updateCustomFeedbackValues($apnsFeedback, $feedback, $deviceTokens)
    {

        //Add failures amount based on apple feedback to our custom feedback
        $feedback['failure'] += count($apnsFeedback['apnsFeedback']);

        //apns tokens
        $apnsTokens = array_pluck($apnsFeedback['apnsFeedback'], 'devtoken');

        foreach ($deviceTokens as $token) {
            if (in_array($token, $apnsTokens)) {
                $feedback['success'] -= 1;
                $feedback['tokenFailList'][] = $token;
            }

        }

        return $feedback;
    }
private function updateCustomFeedbackValues ( $ apnsFeedback , $ feedback , $ deviceTokens ) { //Add failures amount based on apple feedback to our custom feedback $ feedback [ 'failure' ] += count ( $ apnsFeedback [ 'apnsFeedback' ] ) ; //apns tokens $ apnsTokens = array_pluck ( $ apnsFeedback [ 'apnsFeedback' ] , 'devtoken' ) ; foreach ( $ deviceTokens as $ token ) { if ( in_array ( $ token , $ apnsTokens ) ) { $ feedback [ 'success' ] -= 1 ; $ feedback [ 'tokenFailList' ] [ ] = $ token ; } } return $ feedback ; }
Update the success and failure values based on apple feedback

@param $apnsFeedback
@param $feedback
@param $deviceTokens

@return array $feedback
Update the success and failure values based on apple feedback