DocumentGeneratorProvider::provides()   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 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace ByTIC\DocumentGenerator;
4
5
use ByTIC\DocumentGenerator\PdfLetters\Console\DownloadStatsProcess;
6
use ByTIC\DocumentGenerator\PdfLetters\PdfLettersManager;
7
use Nip\Container\ServiceProviders\Providers\AbstractSignatureServiceProvider;
8
9
/**
10
 * Class DocumentGeneratorProvider
11
 * @package ByTIC\DocumentGenerator
12
 */
13
class DocumentGeneratorProvider extends AbstractSignatureServiceProvider
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    public function provides()
19
    {
20
        return ['dg.pdf-letters.manager'];
21
    }
22
23
    /**
24
     * @inheritdoc
25
     */
26
    public function register()
27
    {
28
        $this->registerPdfLettersManager();
29
    }
30
31
    protected function registerPdfLettersManager()
32
    {
33
        $this->getContainer()->share('dg.pdf-letters.manager', function () {
34
            return new PdfLettersManager();
35
        });
36
    }
37
38
    protected function registerCommands()
39
    {
40
        $this->commands(
41
            DownloadStatsProcess::class
42
        );
43
    }
44
}
45