InvoiceFixture   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 20
ccs 5
cts 7
cp 0.7143
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getInvoice() 0 3 1
A getId() 0 3 1
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