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

heimrichhannot / contao-utils-bundle / 12652692899

07 Jan 2025 01:37PM UTC coverage: 25.175% (+0.02%) from 25.158%
12652692899

push

github

web-flow
feature/backport generate data attributes string options (#91)

* backport GenerateDataAttributesStringOptions

* update workflows

* fixed phpstan issue

7 of 25 new or added lines in 2 files covered. (28.0%)

1477 of 5867 relevant lines covered (25.17%)

1.56 hits per line

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

0.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
    {
NEW
13
        return new self();
×
14
    }
15

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

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

27
    public function isNormalizeKeys(): bool
28
    {
NEW
29
        return $this->normalizeKeys;
×
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
    {
NEW
37
        $this->normalizeKeys = $normalizeKeys;
×
NEW
38
        return $this;
×
39
    }
40

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

46
    public function setArrayHandling(GenerateDataAttributesStringArrayHandling $arrayHandling): GenerateDataAttributesStringOptions
47
    {
NEW
48
        $this->arrayHandling = $arrayHandling;
×
NEW
49
        return $this;
×
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

© 2025 Coveralls, Inc