← All changes
|
src/Packetery/Module/EntityFactory/CustomsDeclaration.php
+3
-4
1.6.1
→
2.1
View file →
| @@ -8,16 +8,15 @@ | ||
| 8 | 8 | declare(strict_types=1); |
| 9 | 9 | |
| 10 | 10 | namespace Packetery\Module\EntityFactory; |
| 11 | 11 | |
| 12 | +use Packetery\Core\CoreHelper; | |
| 12 | 13 | use Packetery\Core\Entity; |
| 13 | -use Packetery\Core\Helper; | |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Class CustomsDeclaration. |
| 17 | 17 | */ |
| 18 | 18 | class CustomsDeclaration { |
| 19 | - | |
| 20 | 19 | /** |
| 21 | 20 | * Creates customs declaration entity from standard structure. |
| 22 | 21 | * |
| 23 | 22 | * @param array $data Data. |
| @@ -31,9 +30,9 @@ | ||
| 31 | 30 | $data['ead'], |
| 32 | 31 | (float) $data['delivery_cost'], |
| 33 | 32 | $data['invoice_number'], |
| 34 | 33 | \DateTimeImmutable::createFromFormat( |
| 35 | - Helper::MYSQL_DATE_FORMAT, | |
| 34 | + CoreHelper::MYSQL_DATE_FORMAT, | |
| 36 | 35 | $data['invoice_issue_date'] |
| 37 | 36 | ) |
| 38 | 37 | ); |
| 39 | 38 | $entity->setId( $data['id'] ?? null ); |
| @@ -46,9 +45,9 @@ | ||
| 46 | 45 | |
| 47 | 46 | /** |
| 48 | 47 | * Creates item from standardized structure. |
| 49 | 48 | * |
| 50 | - * @param array $data Data. | |
| 49 | + * @param array<string, string> $data Data. | |
| 51 | 50 | * @return Entity\CustomsDeclarationItem |
| 52 | 51 | */ |
| 53 | 52 | public function createItemFromStandardizedStructure( array $data ): Entity\CustomsDeclarationItem { |
| 54 | 53 | $entity = new Entity\CustomsDeclarationItem( |