CashOnDeliveryData   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 20
ccs 8
cts 8
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setCodPrice() 0 3 1
A setCreditCard() 0 3 1
A setVS() 0 3 1
A setCodCurrency() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Inspirum\Balikobot\Model\PackageData\Package;
6
7
use Inspirum\Balikobot\Definitions\Attribute;
8
9
trait CashOnDeliveryData
10
{
11 1
    public function setCodPrice(float $codPrice): void
12
    {
13 1
        $this->offsetSet(Attribute::COD_PRICE, $codPrice);
0 ignored issues
show
Bug introduced by
It seems like offsetSet() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

13
        $this->/** @scrutinizer ignore-call */ 
14
               offsetSet(Attribute::COD_PRICE, $codPrice);
Loading history...
14
    }
15
16 1
    public function setCodCurrency(string $codCurrency): void
17
    {
18 1
        $this->offsetSet(Attribute::COD_CURRENCY, $codCurrency);
19
    }
20
21 1
    public function setVS(string $vs): void
22
    {
23 1
        $this->offsetSet(Attribute::VS, $vs);
24
    }
25
26 1
    public function setCreditCard(bool $creditCard = true): void
27
    {
28 1
        $this->offsetSet(Attribute::CREDIT_CARD, (int) $creditCard);
29
    }
30
}
31