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

MyIntervals / PHP-CSS-Parser / 13800164147

11 Mar 2025 11:23PM UTC coverage: 55.567%. Remained the same
13800164147

Pull #1145

github

web-flow
Merge 6b581a0d5 into 66718c1b2
Pull Request #1145: [TASK] Add native type declarations for `atRuleName()`

0 of 2 new or added lines in 2 files covered. (0.0%)

2 existing lines in 2 files now uncovered.

1038 of 1868 relevant lines covered (55.57%)

12.4 hits per line

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

0.0
/src/CSSList/KeyFrame.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Sabberworm\CSS\CSSList;
6

7
use Sabberworm\CSS\OutputFormat;
8
use Sabberworm\CSS\Property\AtRule;
9

10
/**
11
 * Note: When constructing an instance of this class, `setVendorKeyFrame()` must be called directly after construction
12
 * for the instance to be valid.
13
 */
14
class KeyFrame extends CSSList implements AtRule
15
{
16
    /**
17
     * @var non-empty-string
18
     */
19
    private $vendorKeyFrame;
20

21
    /**
22
     * @var string|null
23
     */
24
    private $animationName;
25

26
    /**
27
     * @param non-empty-string $vendorKeyFrame
28
     */
29
    public function setVendorKeyFrame($vendorKeyFrame): void
×
30
    {
31
        $this->vendorKeyFrame = $vendorKeyFrame;
×
32
    }
×
33

34
    /**
35
     * @return non-empty-string
36
     */
37
    public function getVendorKeyFrame()
×
38
    {
39
        return $this->vendorKeyFrame;
×
40
    }
41

42
    /**
43
     * @param string $animationName
44
     */
45
    public function setAnimationName($animationName): void
×
46
    {
47
        $this->animationName = $animationName;
×
48
    }
×
49

50
    /**
51
     * @return string|null
52
     */
53
    public function getAnimationName()
×
54
    {
55
        return $this->animationName;
×
56
    }
57

58
    /**
59
     * @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
60
     */
61
    public function __toString(): string
×
62
    {
63
        return $this->render(new OutputFormat());
×
64
    }
65

66
    public function render(OutputFormat $outputFormat): string
×
67
    {
68
        $result = $outputFormat->comments($this);
×
69
        $result .= "@{$this->vendorKeyFrame} {$this->animationName}{$outputFormat->spaceBeforeOpeningBrace()}{";
×
70
        $result .= $this->renderListContents($outputFormat);
×
71
        $result .= '}';
×
72
        return $result;
×
73
    }
74

75
    public function isRootList(): bool
×
76
    {
77
        return false;
×
78
    }
79

80
    /**
81
     * @return non-empty-string
82
     */
NEW
83
    public function atRuleName(): string
×
84
    {
85
        return $this->vendorKeyFrame;
×
86
    }
87

88
    /**
89
     * @return string|null
90
     */
91
    public function atRuleArgs()
×
92
    {
93
        return $this->animationName;
×
94
    }
95
}
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