Passed
Push — master ( aa1d1b...fe7908 )
by Tomáš
12:45
created

ForeignCountryDeliveryData   A

Complexity

Total Complexity 14

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 73
ccs 28
cts 28
cp 1
rs 10
c 0
b 0
f 0
wmc 14

14 Methods

Rating   Name   Duplication   Size   Complexity  
A setInvoicePDF() 0 3 1
A setContentProductCode() 0 3 1
A setContentType() 0 3 1
A setContentAdditionalFee() 0 3 1
A setIBAN() 0 3 1
A setTermsOfTradeLocation() 0 3 1
A setContentData() 0 3 1
A setGenerateInvoice() 0 3 1
A setInvoiceNumber() 0 3 1
A setTermsOfTrade() 0 3 1
A setContentPlaceOfCommital() 0 3 1
A setContentTypeDescription() 0 3 1
A setSWIFT() 0 3 1
A setNoteInvoice() 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 ForeignCountryDeliveryData
10
{
11 1
    public function setInvoiceNumber(string $invoiceNumber): void
12
    {
13 1
        $this->offsetSet(Attribute::INVOICE_NUMBER, $invoiceNumber);
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::INVOICE_NUMBER, $invoiceNumber);
Loading history...
14
    }
15
16 1
    public function setGenerateInvoice(bool $value = true): void
17
    {
18 1
        $this->offsetSet(Attribute::GENERATE_INVOICE, (int) $value);
19
    }
20
21 1
    public function setInvoicePDF(string $pdf): void
22
    {
23 1
        $this->offsetSet(Attribute::INVOICE_PDF, $pdf);
24
    }
25
26 1
    public function setTermsOfTrade(string $terms): void
27
    {
28 1
        $this->offsetSet(Attribute::TERMS_OF_TRADE, $terms);
29
    }
30
31 1
    public function setTermsOfTradeLocation(string $location): void
32
    {
33 1
        $this->offsetSet(Attribute::TERMS_OF_TRADE_LOCATION, $location);
34
    }
35
36
    /**
37
     * @param array<string,mixed> $contentData
38
     */
39 1
    public function setContentData(array $contentData): void
40
    {
41 1
        $this->offsetSet(Attribute::CONTENT_DATA, $contentData);
42
    }
43
44 1
    public function setContentType(string $contentType): void
45
    {
46 1
        $this->offsetSet(Attribute::CONTENT_TYPE, $contentType);
47
    }
48
49 1
    public function setContentTypeDescription(string $description): void
50
    {
51 1
        $this->offsetSet(Attribute::CONTENT_TYPE_DESCRIPTION, $description);
52
    }
53
54 1
    public function setContentPlaceOfCommital(string $place): void
55
    {
56 1
        $this->offsetSet(Attribute::CONTENT_PLACE_OF_COMMITAL, $place);
57
    }
58
59 1
    public function setContentAdditionalFee(float $fee): void
60
    {
61 1
        $this->offsetSet(Attribute::CONTENT_ADDITIONAL_FEE, $fee);
62
    }
63
64 1
    public function setContentProductCode(string $code): void
65
    {
66 1
        $this->offsetSet(Attribute::CONTENT_PRODUCE_CODE, $code);
67
    }
68
69 1
    public function setIBAN(string $bankAccount): void
70
    {
71 1
        $this->offsetSet(Attribute::IBAN, $bankAccount);
72
    }
73
74 1
    public function setSWIFT(string $bankAccount): void
75
    {
76 1
        $this->offsetSet(Attribute::SWIFT, $bankAccount);
77
    }
78
79 1
    public function setNoteInvoice(string $note): void
80
    {
81 1
        $this->offsetSet(Attribute::NOTE_INVOICE, $note);
82
    }
83
}
84