Skip to content

Commit c797f35

Browse files
author
Oleksii Korshenko
authored
MAGETWO-82557: Clean unreachable code in creditmemo model #11663
2 parents c1d961e + 9008e51 commit c797f35

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)