• 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

80.0
/src/Util/HtmlUtil/GenerateDataAttributesStringOptions.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\Util\HtmlUtil;
4

5
class GenerateDataAttributesStringOptions
6
{
7
    private bool $xhtml = false;
8
    private bool                                      $normalizeKeys = true;
9
    private GenerateDataAttributesStringArrayHandling $arrayHandling = GenerateDataAttributesStringArrayHandling::REDUCE;
10

11
    public static function create(): self
12
    {
13
        return new self();
1✔
14
    }
15

16
    public function isXhtml(): bool
17
    {
18
        return $this->xhtml;
1✔
19
    }
20

21
    public function setXhtml(bool $xhtml): GenerateDataAttributesStringOptions
22
    {
23
        $this->xhtml = $xhtml;
×
24
        return $this;
×
25
    }
26

27
    public function isNormalizeKeys(): bool
28
    {
29
        return $this->normalizeKeys;
1✔
30
    }
31

32
    /**
33
     * Array keys are normalized to lowercase dash-cased strings (e.g. Foo Bar_player is transformed to foo-bar-player)
34
     */
35
    public function setNormalizeKeys(bool $normalizeKeys): GenerateDataAttributesStringOptions
36
    {
37
        $this->normalizeKeys = $normalizeKeys;
1✔
38
        return $this;
1✔
39
    }
40

41
    public function getArrayHandling(): GenerateDataAttributesStringArrayHandling
42
    {
43
        return $this->arrayHandling;
1✔
44
    }
45

46
    public function setArrayHandling(GenerateDataAttributesStringArrayHandling $arrayHandling): GenerateDataAttributesStringOptions
47
    {
48
        $this->arrayHandling = $arrayHandling;
1✔
49
        return $this;
1✔
50
    }
51
}
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