Skip to content

Commit

Permalink
refactor after cr
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr committed Apr 27, 2022
1 parent 0d5c9d5 commit c026c5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Resolver/OrganizationIdResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(ShippingGatewayRepositoryInterface $shippingGatewayR
$this->shippingGatewayRepository = $shippingGatewayRepository;
}

public function getOrganizationId(): ?string
public function getOrganizationId(): string
{
$shippingGateway = $this->shippingGatewayRepository->findOneByCode(self::INPOST_CODE);
$config = $shippingGateway->getConfig();
Expand All @@ -31,6 +31,6 @@ public function getOrganizationId(): ?string
throw new \Exception('Can not found config data');
}

return $config['organization_id'];
return $config['organization_id'] ?? '';
}
}
2 changes: 1 addition & 1 deletion src/Resolver/OrganizationIdResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ interface OrganizationIdResolverInterface
{
public const INPOST_CODE = 'inpost';

public function getOrganizationId(): ?string;
public function getOrganizationId(): string;
}

0 comments on commit c026c5c

Please sign in to comment.