Skip to content

Commit

Permalink
Merge pull request Sylius#9540 from pamil/1.1-phpstan-fixes
Browse files Browse the repository at this point in the history
PHPStan 0.10 upgrade & road to level 2 checks
  • Loading branch information
pamil authored Jul 3, 2018
2 parents 6b0e0b5 + 4aa78c3 commit 572f0e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Form/Type/ShippingMethodChoiceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use Sylius\Component\Registry\ServiceRegistryInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Sylius\Component\Shipping\Calculator\CalculatorInterface;
use Sylius\Component\Shipping\Model\ShippingMethodInterface;
use Sylius\Component\Shipping\Model\ShippingSubjectInterface;
use Sylius\Component\Shipping\Resolver\ShippingMethodsResolverInterface;
Expand Down Expand Up @@ -114,6 +115,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
throw new UnexpectedTypeException($method, ShippingMethodInterface::class);
}

/** @var CalculatorInterface $calculator */
$calculator = $this->calculators->get($method->getCalculator());
$shippingCosts[$choiceView->value] = $calculator->calculate($subject, $method->getConfiguration());
}
Expand Down

0 comments on commit 572f0e2

Please sign in to comment.