| 1 | <?php |
||
| 21 | trait FormulaChargeModifierTrait |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var ChargeModifier|null |
||
| 25 | */ |
||
| 26 | protected $formula; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Calculate additional charges. |
||
| 30 | * |
||
| 31 | * @param ActionInterface $action |
||
| 32 | * @param ChargeInterface $charge |
||
| 33 | * @return ChargeInterface[] calculated charges |
||
| 34 | */ |
||
| 35 | public function modifyCharge(ChargeInterface $charge, ActionInterface $action): array |
||
| 39 | |||
| 40 | public function setFormula(ChargeModifier $formula) |
||
| 44 | } |
||
| 45 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.