InvoiceFixture::getInvoice()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace TddWizard\Fixtures\Sales;
5
6
use Magento\Sales\Api\Data\InvoiceInterface;
7
8
class InvoiceFixture
9
{
10
    /**
11
     * @var InvoiceInterface
12
     */
13
    private $invoice;
14
15 5
    public function __construct(InvoiceInterface $shipment)
16
    {
17 5
        $this->invoice = $shipment;
18 5
    }
19
20
    public function getInvoice(): InvoiceInterface
21
    {
22
        return $this->invoice;
23
    }
24
25 4
    public function getId(): int
26
    {
27 4
        return (int) $this->invoice->getEntityId();
28
    }
29
}
30