large commit

This commit is contained in:
Omair Saleh
2019-10-05 13:09:26 +08:00
parent a20feebe0c
commit 0e5f2939e3
94 changed files with 1131 additions and 540 deletions
@@ -17,19 +17,19 @@ abstract class AbstractStepProcessor
abstract function execute(): JsonResponse;
/**
* @param OrderObject $order
* @param int $orderId
* @param StepObject $step
* @return JsonResponse
* @throws InternalServerErrorException
*/
public function handler(OrderObject $order, StepObject $step) {
public function handler(int $orderId, StepObject $step) {
try {
if(!$this->validator()){
return new JsonResponse(['message' => 'Updating step validation has failed due to missing requirements'], HttpStatus::VALIDATION_FAILED);
}
(new CompletesOrderStep())->execute($order, $step);
(new CompletesOrderStep())->execute($orderId, $step);
/** notification */