GenericInvoiceProcessor::getAlias()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace WellCommerce\Bundle\InvoiceBundle\Processor;
4
5
use Symfony\Component\HttpFoundation\Response;
6
use WellCommerce\Bundle\CoreBundle\Helper\Pdf\PdfHelperInterface;
7
use WellCommerce\Bundle\InvoiceBundle\Entity\Invoice;
8
use WellCommerce\Bundle\InvoiceBundle\Generator\InvoiceNumberGeneratorInterface;
9
10
/**
11
 * Class GenericInvoiceProcessor
12
 *
13
 * @author  Adam Piotrowski <[email protected]>
14
 */
15
final class GenericInvoiceProcessor implements InvoiceProcessorInterface
16
{
17
    /**
18
     * @var InvoiceNumberGeneratorInterface
19
     */
20
    private $invoiceNumberGenerator;
21
    
22
    /**
23
     * @var PdfHelperInterface
24
     */
25
    private $pdfHelper;
26
    
27
    public function __construct(InvoiceNumberGeneratorInterface $invoiceNumberGenerator, PdfHelperInterface $pdfHelper)
28
    {
29
        $this->invoiceNumberGenerator = $invoiceNumberGenerator;
30
        $this->pdfHelper              = $pdfHelper;
31
    }
32
    
33
    public function getAlias(): string
34
    {
35
        return 'generic';
36
    }
37
    
38
    public function save(Invoice $invoice)
39
    {
40
        $this->invoiceNumberGenerator->generate($invoice);
41
    }
42
    
43
    public function void(Invoice $invoice)
44
    {
45
    
46
    }
47
    
48
    public function download(Invoice $invoice): Response
49
    {
50
    }
51
    
52
    public function send(Invoice $invoice)
53
    {
54
    }
55
}
56