Przeglądaj źródła

fix datetime init

Vincent GUFFON 3 lat temu
rodzic
commit
80bd729098

+ 4 - 4
src/ApiResources/Dolibarr/DolibarrContractLine.php

@@ -45,13 +45,13 @@ class DolibarrContractLine implements ApiResourcesInterface
      * Service active from date ...
      */
     #[Groups('dolibarr_get')]
-    private ?\DateTime $dateStart;
+    private ?\DateTimeInterface $dateStart = null;
 
     /**
      * Service active to date ...
      */
     #[Groups('dolibarr_get')]
-    private ?\DateTime $dateEnd;
+    private ?\DateTimeInterface $dateEnd = null;
 
     public function getId(): int
     {
@@ -97,7 +97,7 @@ class DolibarrContractLine implements ApiResourcesInterface
         return $this;
     }
 
-    public function getDateStart(): ?\DateTime
+    public function getDateStart(): ?\DateTimeInterface
     {
         return $this->dateStart;
     }
@@ -108,7 +108,7 @@ class DolibarrContractLine implements ApiResourcesInterface
         return $this;
     }
 
-    public function isDateEnd(): ?\DateTime
+    public function isDateEnd(): ?\DateTimeInterface
     {
         return $this->dateEnd;
     }