Passed
Branch master (837a03)
by Tomáš
02:48
created

ForeignCountryDeliveryData   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 50
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setInvoiceNumber() 0 3 1
A setContentData() 0 3 1
A setInvoicePDF() 0 3 1
A setTermsOfTrade() 0 3 1
1
<?php
2
3
namespace Inspirum\Balikobot\Model\Values\Package;
4
5
use Inspirum\Balikobot\Definitions\Option;
6
7
trait ForeignCountryDeliveryData
8
{
9
    /**
10
     * Set the item at a given offset
11
     *
12
     * @param string $key
13
     * @param mixed  $value
14
     *
15
     * @return void
16
     */
17
    abstract public function offsetSet($key, $value);
18
19
    /**
20
     * @param string $invoiceNumber
21
     *
22
     * @return void
23
     */
24 1
    public function setInvoiceNumber(string $invoiceNumber): void
25
    {
26 1
        $this->offsetSet(Option::INVOICE_NUMBER, $invoiceNumber);
27 1
    }
28
29
    /**
30
     * @param string $pdf
31
     *
32
     * @return void
33
     */
34 1
    public function setInvoicePDF(string $pdf): void
35
    {
36 1
        $this->offsetSet(Option::INVOICE_PDF, $pdf);
37 1
    }
38
39
    /**
40
     * @param string $terms
41
     *
42
     * @return void
43
     */
44 1
    public function setTermsOfTrade(string $terms): void
45
    {
46 1
        $this->offsetSet(Option::TERMS_OF_TRADE, $terms);
47 1
    }
48
49
    /**
50
     * @param array<string,string> $contentData
51
     *
52
     * @return void
53
     */
54 1
    public function setContentData(array $contentData): void
55
    {
56 1
        $this->offsetSet(Option::CONTENT_DATA, $contentData);
57 1
    }
58
}
59