src/Repository/StripeLocalChargeRepository.php
<?php
declare(strict_types=1);
/*
* This file is part of the Serendipity HQ Stripe Bundle.
*
* Copyright (c) Adamo Aerendir Crespi <aerendir@serendipityhq.com>.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SerendipityHQ\Bundle\StripeBundle\Repository;
use Doctrine\ORM\EntityRepository;
use SerendipityHQ\Bundle\StripeBundle\Model\StripeLocalCharge;
use SerendipityHQ\Bundle\StripeBundle\Model\StripeLocalResourceInterface;
/**
* @author Audrius Karabanovas <audrius@karabanovas.net>
* @author Adamo Aerendir Crespi <hello@aerendir.me>
*/
final class StripeLocalChargeRepository extends EntityRepository implements ByStripeIdInterface
{
/**
* @param $id
*
* @return object|StripeLocalCharge|null
*/
public function findOneByStripeId($id): ?StripeLocalResourceInterface
{
return $this->findOneBy(['id' => \mb_strtolower($id)]);
}
}