소스 검색

minor lint updates

Olivier Massot 3 년 전
부모
커밋
4c5f65fb77

+ 3 - 3
src/DataPersister/Access/AdminAccessDataPersister.php

@@ -43,12 +43,12 @@ class AdminAccessDataPersister implements ContextAwareDataPersisterInterface
 
         $administrator = $this->accessUtils->findAdminFor($access->getOrganization());
         if(!$administrator){
-            throw new Exception('administrator_not_found', 404);
+            throw new \RuntimeException('administrator_not_found', 404);
         }
 
         $contactPoint = $this->contactPointUtils->getPersonContactPointPrincipal($administrator);
         if(!$contactPoint){
-            throw new Exception('administrator_contact_point_not_found', 404);
+            throw new \RuntimeException('administrator_contact_point_not_found', 404);
         }
 
         $contactPoint->setEmail($data->getEmail());
@@ -57,6 +57,6 @@ class AdminAccessDataPersister implements ContextAwareDataPersisterInterface
 
     public function remove($data, array $context = [])
     {
-        throw new Exception('not supported', 500);
+        throw new \RuntimeException('not supported', 500);
     }
 }

+ 4 - 5
src/DataPersister/Export/LicenceCmf/ExportRequestDataPersister.php

@@ -46,13 +46,12 @@ class ExportRequestDataPersister implements ContextAwareDataPersisterInterface
             );
             return new Response(null, 204);
 
-        } else {
+        }
 
-            $exportService = $this->handler->getExporterFor($exportRequest);
-            $file = $exportService->export($exportRequest);
+        $exportService = $this->handler->getExporterFor($exportRequest);
+        $file = $exportService->export($exportRequest);
 
-            return new Response('File generated: ' . $file->getId(), 200);
-        }
+        return new Response('File generated: ' . $file->getId(), 200);
     }
 
     /**

+ 2 - 1
src/Enum/Organization/LegalEnum.php

@@ -7,11 +7,12 @@ use MyCLabs\Enum\Enum;
 
 /**
  * Statut légal
+ * @method static COMMERCIAL_SOCIETY()
+ * @method static ASSOCIATION_LAW_1901()
  */
 class LegalEnum extends Enum
 {
     private const LOCAL_AUTHORITY = 'LOCAL_AUTHORITY';
     private const ASSOCIATION_LAW_1901 = 'ASSOCIATION_LAW_1901';
     private const COMMERCIAL_SOCIETY = 'COMMERCIAL_SOCIETY';
-
 }