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
|
|||
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 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.