src/Syncer/CustomerSyncer.php
private function sourceExists(StripeLocalCard $card, Collection $sources)
    {
        /** @var Card $source */
        foreach ($sources->data as $source) {
            if ($card->getId() === $source->id) {
                return true;
            }
        }

        return false;
    }
private function sourceExists(StripeLocalCard $card, Collection $sources)
    {
        /** @var Card $source */
        foreach ($sources->data as $source) {
            if ($card->getId() === $source->id) {
                return true;
            }
        }

        return false;
    }
private function sourceExists ( StripeLocalCard $ card , Collection $ sources ) { /** @var Card $source */ foreach ( $ sources -> data as $ source ) { if ( $ card -> getId ( ) === $ source -> id ) { return true ; } } return false ; }
Checks if the given card is set source in the StripeCustomer object.

Perfrom this check guarantees that the local database is ever in sync with the Stripe Account.

@param StripeLocalCard $card
@param Collection      $sources

@return bool
Checks if the given card is set source in the StripeCustomer object .