Skip to content

Commit 9008e51

Browse files
author
Oleksii Korshenko
committed
MAGETWO-82557: Clean unreachable code in creditmemo model #11663
- Merge Pull Request #11663 from adrian-martinez-interactiv4/magento2:FR#CLEAN-UNREACHABLE-CODE-CREDITMEMO-MODEL - Merged commits: 1. 9c19a4c
2 parents e7c5bb5 + 9c19a4c commit 9008e51

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

app/code/Magento/Sales/Model/Order/Creditmemo.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -412,23 +412,6 @@ public function canCancel()
412412
public function canVoid()
413413
{
414414
return false;
415-
$canVoid = false;
416-
if ($this->getState() == self::STATE_REFUNDED) {
417-
$canVoid = $this->getCanVoidFlag();
418-
/**
419-
* If we not retrieve negative answer from payment yet
420-
*/
421-
if (is_null($canVoid)) {
422-
$canVoid = $this->getOrder()->getPayment()->canVoid();
423-
if ($canVoid === false) {
424-
$this->setCanVoidFlag(false);
425-
$this->_saveBeforeDestruct = true;
426-
}
427-
} else {
428-
$canVoid = (bool)$canVoid;
429-
}
430-
}
431-
return $canVoid;
432415
}
433416

434417
/**

0 commit comments

Comments
 (0)