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

heimrichhannot / contao-utils-bundle / 6685862485

29 Oct 2023 09:22PM UTC coverage: 74.155% (+52.0%) from 22.152%
6685862485

Pull #67

github

koertho
cleanup composer file
Pull Request #67: Version 3

216 of 216 new or added lines in 19 files covered. (100.0%)

746 of 1006 relevant lines covered (74.16%)

3.69 hits per line

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

0.0
/src/Twig/StringExtension.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 HeimrichHannot\UtilsBundle\Util\Utils;
12
use Twig\Extension\AbstractExtension;
13
use Twig\TwigFilter;
14

15
class StringExtension extends AbstractExtension
16
{
17
    public function __construct(
18
        protected Utils $utils,
19
    )
20
    {
21
    }
×
22

23
    /**
24
     * Get list of twig filters.
25
     *
26
     * @return array|\Twig_SimpleFilter[]
27
     */
28
    public function getFilters()
29
    {
30
        return [
×
31
            new TwigFilter('anonymize_email', [$this, 'anonymizeEmail']),
×
32
        ];
×
33
    }
34

35
    public function anonymizeEmail(string $text): string
36
    {
37
        return $this->utils->anonymize()->anonymizeEmail($text);
×
38
    }
39
}
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