mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Merge branch 'feature/separate-order-items-subtotal-calculation-logic' of github.com:4c0n/Sylius into feature/separate-order-items-subtotal-calculation-logic
This commit is contained in:
commit
7cca8bc5d2
1 changed files with 4 additions and 4 deletions
|
|
@ -24,16 +24,16 @@ class OrderItemsSubtotalExtension extends \Twig_Extension
|
|||
|
||||
public function __construct(?OrderItemsSubtotalCalculatorInterface $calculator = null)
|
||||
{
|
||||
if (null !== $calculator) {
|
||||
$this->calculator = $calculator;
|
||||
} else {
|
||||
$this->calculator = new OrderItemsSubtotalCalculator();
|
||||
if (null === $calculator) {
|
||||
$calculator = new OrderItemsSubtotalCalculator();
|
||||
|
||||
@trigger_error(
|
||||
'Not passing a calculator is deprecated since 1.6. Argument will no longer be optional from 2.0.',
|
||||
\E_USER_DEPRECATED
|
||||
);
|
||||
}
|
||||
|
||||
$this->calculator = $calculator;
|
||||
}
|
||||
|
||||
public function getFunctions(): array
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue