Issues (58)

Services/AzineMailgunTwigExtension.php (1 issue)

1
<?php
2
3
namespace Azine\MailgunWebhooksBundle\Services;
4
5
use Twig\Extension\AbstractExtension;
6
7
/**
8
 * Class AzineMailgunTwigExtension
9
 * Provides some filters and global variables.
10
 */
11
class AzineMailgunTwigExtension extends AbstractExtension
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function getFilters()
17
    {
18
        return array(
19
            'printArray' => new \Twig_SimpleFilter('printArray', array($this, 'printArray'), array('is_safe' => array('html'))),
20
        );
21
    }
22
23
    /**
24
     * @param array $var
25
     *
26
     * @return mixed
27
     */
28
    public static function printArray(array $var)
29
    {
30
        return var_dump($var);
0 ignored issues
show
Security Debugging Code introduced by
var_dump($var) looks like debug code. Are you sure you do not want to remove it?
Loading history...
31
    }
32
33
    /**
34
     * Returns the name of the extension.
35
     *
36
     * @return string The extension name
37
     */
38
    public function getName()
39
    {
40
        return 'azine_mailgun_webhooks_bundle_twig_extension';
41
    }
42
}
43