1 | <?php |
||
30 | class TaxExtension extends AbstractExtension |
||
31 | { |
||
32 | /** |
||
33 | * @var TaxRuleRepository |
||
34 | */ |
||
35 | private $taxRuleRepository; |
||
36 | |||
37 | /** |
||
38 | * TaxExtension constructor. |
||
39 | * @param TaxRuleRepository $taxRuleRepository |
||
40 | */ |
||
41 | public function __construct(TaxRuleRepository $taxRuleRepository) |
||
45 | |||
46 | /** |
||
47 | * Returns a list of functions to add to the existing list. |
||
48 | * |
||
49 | * @return TwigFunction[] An array of functions |
||
50 | */ |
||
51 | public function getFunctions() |
||
57 | |||
58 | /** |
||
59 | * 明細が軽減税率対象かどうかを返す. |
||
60 | * |
||
61 | * 受注作成時点での標準税率と比較し, 異なれば軽減税率として判定する. |
||
62 | * |
||
63 | * @param null $OrderItem |
||
64 | * @return bool |
||
65 | */ |
||
66 | public function isReducedTaxRate($OrderItem = null) |
||
89 | } |
||
90 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.