Completed
Push — master ( b86059...b2e8e3 )
by Andrii
07:55 queued 13s
created

MultiCurrencyException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 10
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolve() 0 7 1
1
<?php
2
3
namespace hipanel\modules\finance\cart;
4
5
use hiqdev\yii2\cart\NotPurchasableException;
6
use Yii;
7
8
final class MultiCurrencyException extends NotPurchasableException
9
{
10
    public function resolve(): bool
11
    {
12
        Yii::error('Cart position "' . $this->position->getName() . '" was removed from the cart because multi-currency cart is not available for now', 'hipanel.cart');
13
        $this->cart->remove($this->position);
14
15
        return true;
16
    }
17
}
18