Skip to content

Commit

Permalink
Merge branch '1.4' into 1.5
Browse files Browse the repository at this point in the history
* 1.4:
  Remove outdated phpstan ignores
  [RefundUnitsConverter] Change interface method signature
  • Loading branch information
GSadee committed Jun 30, 2023
2 parents a7b978e + 645dad8 commit 66c42d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Converter/RefundUnitsConverterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

namespace Sylius\RefundPlugin\Converter;

use Sylius\RefundPlugin\Model\RefundTypeInterface;

/**
* @method array convert(array $units, string $unitRefundClass)
* @method array convert(array $units, string|RefundTypeInterface $unitRefundClass)
*/
interface RefundUnitsConverterInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Creator/RefundUnitsCommandCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ public function fromRequest(Request $request): RefundUnits
/** @phpstan-ignore-next-line */
$units = $this->requestToRefundUnitsConverter->convert(
$request->request->has('sylius_refund_units') ? $request->request->all()['sylius_refund_units'] : [],
/** @phpstan-ignore-next-line */
RefundType::orderItemUnit(),
OrderItemUnitRefund::class,
);

/** @phpstan-ignore-next-line */
$shipments = $this->requestToRefundUnitsConverter->convert(
$request->request->has('sylius_refund_shipments') ? $request->request->all()['sylius_refund_shipments'] : [],
/** @phpstan-ignore-next-line */
RefundType::shipment(),
ShipmentRefund::class,
);
Expand Down

0 comments on commit 66c42d3

Please sign in to comment.