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

ReportTwigExtension::getFunctions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 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