소스 검색

minor fixes

Olivier Massot 1 년 전
부모
커밋
e65c515c02
2개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 5 5
      src/Entity/Organization/OrganizationIdentification.php
  2. 3 3
      src/Service/Organization/OrganizationFactory.php

+ 5 - 5
src/Entity/Organization/OrganizationIdentification.php

@@ -58,7 +58,7 @@ class OrganizationIdentification
     private ?string $streetAddressThird;
 
     #[ORM\Column]
-    private ?string $city;
+    private ?string $addressCity;
 
     #[ORM\Column]
     private ?string $postalCode;
@@ -146,14 +146,14 @@ class OrganizationIdentification
         return $this;
     }
 
-    public function getCity(): ?string
+    public function getAddressCity(): ?string
     {
-        return $this->city;
+        return $this->addressCity;
     }
 
-    public function setCity(?string $city): self
+    public function setAddressCity(?string $addressCity): self
     {
-        $this->city = $city;
+        $this->addressCity = $addressCity;
         return $this;
     }
 

+ 3 - 3
src/Service/Organization/OrganizationFactory.php

@@ -206,7 +206,7 @@ class OrganizationFactory
 
         if (
             $this->organizationIdentificationRepository->findOneBy(
-                ['normalizedName' => $normalizedName, 'city' => $organizationCreationRequest->getCity()]
+                ['normalizedName' => $normalizedName, 'addressCity' => $organizationCreationRequest->getCity()]
             )
         ) {
             throw new \RuntimeException(
@@ -224,8 +224,8 @@ class OrganizationFactory
         if (
             $this->organizationIdentificationRepository->findOneBy(
                 [
-                    'address' => $address,
-                    'city' => $organizationCreationRequest->getCity(),
+                    'normalizedAddress' => $address,
+                    'addressCity' => $organizationCreationRequest->getCity(),
                     'postalCode' => $organizationCreationRequest->getPostalCode()
                 ]
             )