• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

heimrichhannot / contao-utils-bundle / 6809777185

09 Nov 2023 09:22AM UTC coverage: 22.835%. Remained the same
6809777185

push

github

koertho
deprecate twig filters and tests

2 of 32 new or added lines in 8 files covered. (6.25%)

4 existing lines in 4 files now uncovered.

1255 of 5496 relevant lines covered (22.83%)

1.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Twig/ArrayExtension.php
1
<?php
2

3
/*
4
 * Copyright (c) 2021 Heimrich & Hannot GmbH
5
 *
6
 * @license LGPL-3.0-or-later
7
 */
8

9
namespace HeimrichHannot\UtilsBundle\Twig;
10

11
use Contao\StringUtil;
12
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
13
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
14
use Twig\Extension\AbstractExtension;
15
use Twig\TwigFilter;
16

17
class ArrayExtension extends AbstractExtension implements ContainerAwareInterface
18
{
19
    use ContainerAwareTrait;
20

21
    /**
22
     * Get list of twig filters.
23
     *
24
     * @return array|\Twig_SimpleFilter[]
25
     */
26
    public function getFilters()
27
    {
28
        return [
×
NEW
29
            new TwigFilter('deserialize', [$this, 'deserialize'], ['deprecated' => true]),
×
30
        ];
×
31
    }
32

33
    public function deserialize(?string $text, bool $forceArray = false): ?array
34
    {
35
        return StringUtil::deserialize($text, $forceArray);
×
36
    }
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc