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

MyIntervals / PHP-CSS-Parser / 22021135028

14 Feb 2026 05:08PM UTC coverage: 73.032% (+0.2%) from 72.791%
22021135028

Pull #1521

github

web-flow
Merge 87e9ba5ce into f6ddd4847
Pull Request #1521: [TASK] Rename methods in `RuleContainer`

51 of 58 new or added lines in 4 files covered. (87.93%)

3 existing lines in 1 file now uncovered.

1568 of 2147 relevant lines covered (73.03%)

35.76 hits per line

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

26.32
/src/RuleSet/AtRuleSet.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Sabberworm\CSS\RuleSet;
6

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

10
/**
11
 * This class represents rule sets for generic at-rules which are not covered by specific classes, i.e., not
12
 * `@import`, `@charset` or `@media`.
13
 *
14
 * A common example for this is `@font-face`.
15
 */
16
class AtRuleSet extends RuleSet implements AtRule
17
{
18
    /**
19
     * @var non-empty-string
20
     */
21
    private $type;
22

23
    /**
24
     * @var string
25
     */
26
    private $arguments;
27

28
    /**
29
     * @param non-empty-string $type
30
     * @param int<1, max>|null $lineNumber
31
     */
32
    public function __construct(string $type, string $arguments = '', ?int $lineNumber = null)
2✔
33
    {
34
        parent::__construct($lineNumber);
2✔
35
        $this->type = $type;
2✔
36
        $this->arguments = $arguments;
2✔
37
    }
2✔
38

39
    /**
40
     * @return non-empty-string
41
     */
42
    public function atRuleName(): string
×
43
    {
44
        return $this->type;
×
45
    }
46

47
    public function atRuleArgs(): string
×
48
    {
49
        return $this->arguments;
×
50
    }
51

52
    /**
53
     * @return non-empty-string
54
     */
55
    public function render(OutputFormat $outputFormat): string
×
56
    {
57
        $formatter = $outputFormat->getFormatter();
×
58
        $result = $formatter->comments($this);
×
59
        $arguments = $this->arguments;
×
60
        if ($arguments !== '') {
×
61
            $arguments = ' ' . $arguments;
×
62
        }
63
        $result .= "@{$this->type}$arguments{$formatter->spaceBeforeOpeningBrace()}{";
×
NEW
64
        $result .= $this->renderDeclarations($outputFormat);
×
65
        $result .= '}';
×
66
        return $result;
×
67
    }
68
}
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