Passed
Pull Request — master (#87)
by
unknown
04:11
created

createWithVariantAndImagePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 6
c 1
b 0
f 1
nc 1
nop 4
dl 0
loc 16
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
    (
20
        ProductVariantInterface $variant,
21
        string $path,
22
        int $quantity,
23
        string $actualVariant
24
    ):  VariantPdfModel
25
    {
26
        $productPdfModel = new VariantPdfModel();
27
28
        $productPdfModel->setVariant($variant);
29
        $productPdfModel->setImagePath($path);
30
        $productPdfModel->setQuantity($quantity);
31
        $productPdfModel->setActualVariant($actualVariant);
32
33
        return $productPdfModel;
34
    }
35
}