diff --git a/src/Checker/TableRateShippingMethodEligibilityChecker.php b/src/Checker/TableRateShippingMethodEligibilityChecker.php index 49d0259..0cdc50d 100644 --- a/src/Checker/TableRateShippingMethodEligibilityChecker.php +++ b/src/Checker/TableRateShippingMethodEligibilityChecker.php @@ -5,7 +5,7 @@ namespace Webgriffe\SyliusTableRateShippingPlugin\Checker; use Sylius\Component\Core\Model\ShipmentInterface; -use Sylius\Component\Shipping\Checker\ShippingMethodEligibilityCheckerInterface; +use Sylius\Component\Shipping\Checker\Eligibility\ShippingMethodEligibilityCheckerInterface; use Sylius\Component\Shipping\Model\ShippingMethodInterface; use Sylius\Component\Shipping\Model\ShippingSubjectInterface; use Webgriffe\SyliusTableRateShippingPlugin\Calculator\TableRateShippingCalculator; diff --git a/src/EventSubscriber/TableRateDeleteSubscriber.php b/src/EventSubscriber/TableRateDeleteSubscriber.php index e6d77d2..fa0a11e 100644 --- a/src/EventSubscriber/TableRateDeleteSubscriber.php +++ b/src/EventSubscriber/TableRateDeleteSubscriber.php @@ -25,7 +25,7 @@ public function __construct(ShippingMethodRepositoryInterface $shippingMethodRep /** * {@inheritdoc} */ - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return ['webgriffe.shipping_table_rate.pre_delete' => 'onTableRatePreDelete']; } diff --git a/src/Form/EventSubscriber/AddCurrencySubscriber.php b/src/Form/EventSubscriber/AddCurrencySubscriber.php index 4a1ebf7..c484745 100644 --- a/src/Form/EventSubscriber/AddCurrencySubscriber.php +++ b/src/Form/EventSubscriber/AddCurrencySubscriber.php @@ -15,7 +15,7 @@ class AddCurrencySubscriber implements EventSubscriberInterface /** * {@inheritdoc} */ - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [FormEvents::PRE_SET_DATA => 'preSetData']; } diff --git a/src/Form/Type/Shipping/Calculator/ChannelBasedTableRateConfigurationType.php b/src/Form/Type/Shipping/Calculator/ChannelBasedTableRateConfigurationType.php index 36320f9..454692f 100644 --- a/src/Form/Type/Shipping/Calculator/ChannelBasedTableRateConfigurationType.php +++ b/src/Form/Type/Shipping/Calculator/ChannelBasedTableRateConfigurationType.php @@ -28,7 +28,7 @@ public function getParent(): string return ChannelCollectionType::class; } - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'webgriffe_sylius_table_rate_shipping_plugin_calculator_channel_based_table_rate'; } diff --git a/src/Resolver/TableRateResolver.php b/src/Resolver/TableRateResolver.php index d697b4d..cf075bf 100644 --- a/src/Resolver/TableRateResolver.php +++ b/src/Resolver/TableRateResolver.php @@ -57,6 +57,7 @@ public function resolve(ShipmentInterface $shipment, array $calculatorConfig): S /** @var ShippingTableRate $tableRate */ $tableRate = $calculatorConfig[$channelCode][TableRateConfigurationType::TABLE_RATE_FIELD_NAME]; + /** @var ShippingTableRate $tableRate */ $tableRate = $this->tableRateRepository->findOneBy(['code' => $tableRate->getCode()]); Assert::isInstanceOf($tableRate, ShippingTableRate::class);