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

heimrichhannot / contao-encore-bundle / 27198996514

09 Jun 2026 10:07AM UTC coverage: 75.679% (-1.9%) from 77.539%
27198996514

push

github

web-flow
Allow extension from App, various enhancements (#38)

28 of 68 new or added lines in 11 files covered. (41.18%)

3 existing lines in 2 files now uncovered.

641 of 847 relevant lines covered (75.68%)

2.27 hits per line

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

92.86
/src/EntryPoint/EntryPoint.php
1
<?php
2

3
namespace HeimrichHannot\EncoreBundle\EntryPoint;
4

5
use HeimrichHannot\EncoreContracts\EncoreEntry;
6

7
class EntryPoint
8
{
9
    public function __construct(
10
        public readonly string $name,
11
        public readonly bool $active = true,
12
        public readonly bool $head = false,
13
        public readonly bool $requiresCss = false,
14
        public readonly string $origin = '',
15
        public readonly string $extension = '',
16
        public readonly ?bool $defer = null,
17
    ) {
18
    }
5✔
19

20
    public static function fromEncoreEntry(EncoreEntry $entry, bool $active, string $origin, string $extension = ''): self
21
    {
22
        return new EntryPoint(
1✔
23
            name: $entry->name,
1✔
24
            active: $active,
1✔
25
            head: $entry->isHeadScript,
1✔
26
            requiresCss: $entry->requiresCss,
1✔
27
            origin: $origin,
1✔
28
            extension: $extension,
1✔
29
            defer: $entry->defer,
1✔
30
        );
1✔
31
    }
32

33
    public function getScriptExtraAttributes(): array
34
    {
35
        $attributes = [];
2✔
36

37
        if (is_bool($this->defer)) {
2✔
NEW
38
            $attributes['defer'] = $this->defer;
×
39
        }
40

41
        return $attributes;
2✔
42
    }
43
}
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