| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function __construct(?OrderItemsSubtotalCalculatorInterface $calculator = null) |
||
| 28 | { |
||
| 29 | if (null === $calculator) { |
||
| 30 | $calculator = new OrderItemsSubtotalCalculator(); |
||
| 31 | |||
| 32 | @trigger_error( |
||
|
|
|||
| 33 | 'Not passing a calculator is deprecated since 1.6. Argument will no longer be optional from 2.0.', |
||
| 34 | \E_USER_DEPRECATED |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->calculator = $calculator; |
||
| 39 | } |
||
| 40 | |||
| 53 |
If you suppress an error, we recommend checking for the error condition explicitly: