fix(phpstan): ajax - improve null checking and function existence verification
Changes include: 1) In `removePos.php`, removed the usage of null safe method call, as it was not needed. 2) In `getOrderControl.php`, added a null guard before trying to get view from the OrderProcess and use it. If the method does not exist, null will be assigned to `$View`. 3) Removed unnecessary fallback to get the first step in `getStep.php`. The current step is enough. 4) In `savePayment.php` added a check for the existence of 'savePayment' method before invoking it to avoid possible errors. 5) The fallback to get the first step was also removed in `reload.php`. 6) Removed an unnecessary if condition in `send.php` and directly assigned current step's name to `$current`. 7) In `setQuantity.php`, added a verification to check the existence of 'setQuantity' method before calling it. Related: #172
Übergeordneter
afb39d80
No related branches found
No related tags found
- ajax/frontend/basket/removePos.php 1 Ergänzung, 1 Löschungajax/frontend/basket/removePos.php
- ajax/frontend/order/getOrderControl.php 6 Ergänzungen, 1 Löschungajax/frontend/order/getOrderControl.php
- ajax/frontend/order/getStep.php 0 Ergänzungen, 5 Löschungenajax/frontend/order/getStep.php
- ajax/frontend/order/processing/savePayment.php 4 Ergänzungen, 3 Löschungenajax/frontend/order/processing/savePayment.php
- ajax/frontend/order/reload.php 0 Ergänzungen, 4 Löschungenajax/frontend/order/reload.php
- ajax/frontend/order/send.php 1 Ergänzung, 5 Löschungenajax/frontend/order/send.php
- ajax/frontend/order/setQuantity.php 1 Ergänzung, 1 Löschungajax/frontend/order/setQuantity.php
Bitte registrieren oder Anmelden zum Kommentieren