Passed
Push — master ( 6daa1b...44aa55 )
by Przemysław eRIZ
04:09
created

createWithVariantAndImagePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 14
rs 10
1
<?php
2
3
/*
4
 * This file was created by developers working at BitBag
5
 * Do you need more information about us and what we do? Visit our https://bitbag.io website!
6
 * We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
7
*/
8
9
declare(strict_types=1);
10
11
namespace BitBag\SyliusWishlistPlugin\Model\Factory;
12
13
use BitBag\SyliusWishlistPlugin\Model\VariantPdfModel;
14
use Sylius\Component\Core\Model\ProductVariantInterface;
15
16
final class VariantPdfModelFactory implements VariantPdfModelFactoryInterface
17
{
18
    public function createWithVariantAndImagePath(
19
        ProductVariantInterface $variant,
20
        string $path,
21
        int $quantity,
22
        string $actualVariant
23
    ): VariantPdfModel {
24
        $productPdfModel = new VariantPdfModel();
25
26
        $productPdfModel->setVariant($variant);
27
        $productPdfModel->setImagePath($path);
28
        $productPdfModel->setQuantity($quantity);
29
        $productPdfModel->setActualVariant($actualVariant);
30
31
        return $productPdfModel;
32
    }
33
}
34