Passed
Push — master ( 83ddc6...97fe0d )
by Tomáš
20:22 queued 08:10
created

ForeignCountryDeliveryData::setCustomIndicator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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 setInvoiceType(string $type): void
27
    {
28 1
        $this->offsetSet(Attribute::INVOICE_TYPE, $type);
29
    }
30
31 1
    public function setTermsOfTrade(string $terms): void
32
    {
33 1
        $this->offsetSet(Attribute::TERMS_OF_TRADE, $terms);
34
    }
35
36 1
    public function setTermsOfTradeLocation(string $location): void
37
    {
38 1
        $this->offsetSet(Attribute::TERMS_OF_TRADE_LOCATION, $location);
39
    }
40
41
    /**
42
     * @param array<string,mixed> $contentData
43
     */
44 1
    public function setContentData(array $contentData): void
45
    {
46 1
        $this->offsetSet(Attribute::CONTENT_DATA, $contentData);
47
    }
48
49 1
    public function setContentType(string $contentType): void
50
    {
51 1
        $this->offsetSet(Attribute::CONTENT_TYPE, $contentType);
52
    }
53
54 1
    public function setContentTypeDescription(string $description): void
55
    {
56 1
        $this->offsetSet(Attribute::CONTENT_TYPE_DESCRIPTION, $description);
57
    }
58
59 1
    public function setContentPlaceOfCommital(string $place): void
60
    {
61 1
        $this->offsetSet(Attribute::CONTENT_PLACE_OF_COMMITAL, $place);
62
    }
63
64 1
    public function setContentAdditionalFee(float $fee): void
65
    {
66 1
        $this->offsetSet(Attribute::CONTENT_ADDITIONAL_FEE, $fee);
67
    }
68
69 1
    public function setContentProductCode(string $code): void
70
    {
71 1
        $this->offsetSet(Attribute::CONTENT_PRODUCE_CODE, $code);
72
    }
73
74 1
    public function setIBAN(string $bankAccount): void
75
    {
76 1
        $this->offsetSet(Attribute::IBAN, $bankAccount);
77
    }
78
79 1
    public function setSWIFT(string $bankAccount): void
80
    {
81 1
        $this->offsetSet(Attribute::SWIFT, $bankAccount);
82
    }
83
84 1
    public function setNoteInvoice(string $note): void
85
    {
86 1
        $this->offsetSet(Attribute::NOTE_INVOICE, $note);
87
    }
88
89 1
    public function setCustomIndicator(bool $value): void
90
    {
91 1
        $this->offsetSet(Attribute::CUSTOMS_INDICATOR, (int) $value);
92
    }
93
}
94