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

MyIntervals / PHP-CSS-Parser / 13816645941

12 Mar 2025 04:33PM UTC coverage: 55.573% (-0.1%) from 55.68%
13816645941

Pull #898

github

web-flow
Merge 18801d18b into b0238f0a4
Pull Request #898: [TASK] Avoid magic method forwarding in `OutputFormat`

5 of 17 new or added lines in 4 files covered. (29.41%)

1 existing line in 1 file now uncovered.

1042 of 1875 relevant lines covered (55.57%)

12.37 hits per line

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

16.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
class KeyFrame extends CSSList implements AtRule
11
{
12
    /**
13
     * @var non-empty-string
14
     */
15
    private $vendorKeyFrame = 'keyframes';
16

17
    /**
18
     * @var non-empty-string
19
     */
20
    private $animationName = 'none';
21

22
    /**
23
     * @param non-empty-string $vendorKeyFrame
24
     */
25
    public function setVendorKeyFrame(string $vendorKeyFrame): void
×
26
    {
27
        $this->vendorKeyFrame = $vendorKeyFrame;
×
28
    }
×
29

30
    /**
31
     * @return non-empty-string
32
     */
33
    public function getVendorKeyFrame(): string
1✔
34
    {
35
        return $this->vendorKeyFrame;
1✔
36
    }
37

38
    /**
39
     * @param non-empty-string $animationName
40
     */
41
    public function setAnimationName(string $animationName): void
×
42
    {
43
        $this->animationName = $animationName;
×
44
    }
×
45

46
    /**
47
     * @return non-empty-string
48
     */
49
    public function getAnimationName(): string
1✔
50
    {
51
        return $this->animationName;
1✔
52
    }
53

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

62
    public function render(OutputFormat $outputFormat): string
×
63
    {
NEW
64
        $formatter = $outputFormat->getFormatter();
×
NEW
65
        $result = $formatter->comments($this);
×
NEW
66
        $result .= "@{$this->vendorKeyFrame} {$this->animationName}{$formatter->spaceBeforeOpeningBrace()}{";
×
67
        $result .= $this->renderListContents($outputFormat);
×
68
        $result .= '}';
×
69
        return $result;
×
70
    }
71

72
    public function isRootList(): bool
×
73
    {
74
        return false;
×
75
    }
76

77
    /**
78
     * @return non-empty-string
79
     */
80
    public function atRuleName(): string
×
81
    {
82
        return $this->vendorKeyFrame;
×
83
    }
84

85
    /**
86
     * @return non-empty-string
87
     */
88
    public function atRuleArgs(): string
×
89
    {
90
        return $this->animationName;
×
91
    }
92
}
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