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

68publishers / webpack-encore-bundle / 12719007642

10 Jan 2025 11:45PM UTC coverage: 91.379% (-4.7%) from 96.114%
12719007642

push

github

tg666
Stack update

- changed minimal PHP version to `8.3`
- dropped support for Latte v2
- dropped support for symfony components v5 and v6

318 of 348 relevant lines covered (91.38%)

0.91 hits per line

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

58.33
/src/Event/RenderAssetTagEvent.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace SixtyEightPublishers\WebpackEncoreBundle\Event;
6

7
final class RenderAssetTagEvent
8
{
9
        public const TYPE_SCRIPT = 'script';
10
        public const TYPE_LINK = 'link';
11

12
        private string $type;
13

14
        private string $url;
15

16
        /** @var array<string, mixed> */
17
        private array $attributes;
18

19
        /**
20
         * @param array<string, mixed> $attributes
21
         */
22
        public function __construct(string $type, string $url, array $attributes)
23
        {
24
                $this->type = $type;
1✔
25
                $this->url = $url;
1✔
26
                $this->attributes = $attributes;
1✔
27
        }
1✔
28

29
        public function isScriptTag(): bool
30
        {
31
                return self::TYPE_SCRIPT === $this->type;
×
32
        }
33

34
        public function isLinkTag(): bool
35
        {
36
                return self::TYPE_LINK === $this->type;
×
37
        }
38

39
        public function getUrl(): string
40
        {
41
                return $this->url;
×
42
        }
43

44
        /**
45
         * @return array<string, mixed>
46
         */
47
        public function getAttributes(): array
48
        {
49
                return $this->attributes;
1✔
50
        }
51

52
        /**
53
         * @param mixed $value
54
         */
55
        public function setAttribute(string $name, $value): void
56
        {
57
                $this->attributes[$name] = $value;
1✔
58
        }
1✔
59

60
        public function removeAttribute(string $name): void
61
        {
62
                unset($this->attributes[$name]);
×
63
        }
×
64
}
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