mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
php code fix for Residential Address
This commit is contained in:
@@ -17,8 +17,6 @@ use DateTimeImmutable;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
use function Symfony\Component\DependencyInjection\Loader\Configurator\ref;
|
||||
|
||||
/**
|
||||
* @method ResidentialAddress|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method ResidentialAddress|null findOneBy(array $criteria, array $orderBy = null)
|
||||
@@ -38,10 +36,11 @@ class ResidentialAddressRepository extends ServiceEntityRepository
|
||||
$date = null === $at ? new DateTimeImmutable('today') : $at;
|
||||
|
||||
foreach ($addresses as $a) {
|
||||
if($a->getStartDate() < $date && $a->getEndDate() > $date) {
|
||||
if ($a->getStartDate() < $date && $a->getEndDate() > $date) {
|
||||
return $a;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user