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

68publishers / webpack-encore-bundle / 13510931892

25 Feb 2025 12:37AM UTC coverage: 93.452% (+2.1%) from 91.379%
13510931892

push

github

tg666
PHP-Cs-Fixer should be run on PHP 8.3 because the package does not support PHP 8.4

314 of 336 relevant lines covered (93.45%)

0.93 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 string TypeScript = 'script';
10
    public const string TypeLink = '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::TypeScript === $this->type;
×
32
    }
33

34
    public function isLinkTag(): bool
35
    {
36
        return self::TypeLink === $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
    public function setAttribute(string $name, mixed $value): void
53
    {
54
        $this->attributes[$name] = $value;
1✔
55
    }
1✔
56

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