Completed
Push — master ( b526e9...87ea4e )
by Giancarlos
03:25
created

ReportTwigExtension   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 22
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFilters() 0 11 1
A getFunctions() 0 7 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Administrador
5
 * Date: 20/01/2018
6
 * Time: 12:45 PM.
7
 */
8
9
namespace Greenter\Report\Extension;
10
11
use Greenter\Report\Filter\DocumentFilter;
12
use Greenter\Report\Filter\FormatFilter;
13
use Greenter\Report\Filter\ImageFilter;
14
use Greenter\Report\Filter\ResolveFilter;
15
16
/**
17
 * Class ReportTwigExtension.
18
 */
19
class ReportTwigExtension extends \Twig_Extension
20
{
21 2
    public function getFilters()
22
    {
23
        return [
24 2
            new \Twig_SimpleFilter('doc_name', DocumentFilter::class.'::getNameDoc'),
25 2
            new \Twig_SimpleFilter('symbol_money', DocumentFilter::class.'::getSymbolCurrency'),
26 2
            new \Twig_SimpleFilter('name_money', DocumentFilter::class.'::getNameCurrency'),
27 2
            new \Twig_SimpleFilter('symbol_docident', DocumentFilter::class.'::getSymbolDocIdentidad'),
28 2
            new \Twig_SimpleFilter('image_b64', ImageFilter::class.'::toBase64'),
29 2
            new \Twig_SimpleFilter('n_format', FormatFilter::class.'::number'),
30 2
        ];
31
    }
32
33 2
    public function getFunctions()
34
    {
35
        return [
36 2
            new \Twig_SimpleFunction('legend', ResolveFilter::class.'::getValueLegend'),
37 2
            new \Twig_SimpleFunction('qrCode', ResolveFilter::class.'::getQr'),
38 2
        ];
39
    }
40
}
41