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

MyIntervals / PHP-CSS-Parser / 15863417424

24 Jun 2025 11:12PM UTC coverage: 57.898% (-0.06%) from 57.953%
15863417424

Pull #1258

github

web-flow
Merge b64cb1a50 into 710dab9ad
Pull Request #1258: [TASK] Remove `getLineNo()` and `getColNo()`

20 of 23 new or added lines in 22 files covered. (86.96%)

1 existing line in 1 file now uncovered.

1052 of 1817 relevant lines covered (57.9%)

16.95 hits per line

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

90.0
/src/Position/Position.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Sabberworm\CSS\Position;
6

7
/**
8
 * Provides a standard reusable implementation of `Positionable`.
9
 *
10
 * @internal
11
 *
12
 * @phpstan-require-implements Positionable
13
 */
14
trait Position
15
{
16
    /**
17
     * @var int<1, max>|null
18
     */
19
    protected $lineNumber;
20

21
    /**
22
     * @var int<0, max>|null
23
     */
24
    protected $columnNumber;
25

26
    /**
27
     * @return int<1, max>|null
28
     */
29
    public function getLineNumber(): ?int
385✔
30
    {
31
        return $this->lineNumber;
385✔
32
    }
33

34
    /**
35
     * @return int<0, max>|null
36
     */
37
    public function getColumnNumber(): ?int
372✔
38
    {
39
        return $this->columnNumber;
372✔
40
    }
41

42
    /**
43
     * @param int<0, max>|null $lineNumber
44
     * @param int<0, max>|null $columnNumber
45
     *
46
     * @return $this fluent interface
47
     */
48
    public function setPosition(?int $lineNumber, ?int $columnNumber = null): Positionable
528✔
49
    {
50
        if ($lineNumber === 0) {
528✔
NEW
UNCOV
51
            \trigger_error('$lineNumber === 0');
×
52
        }
53
        // The conditional is for backwards compatibility (backcompat); `0` will not be allowed in future.
54
        $this->lineNumber = $lineNumber !== 0 ? $lineNumber : null;
528✔
55
        $this->columnNumber = $columnNumber;
528✔
56

57
        return $this;
528✔
58
    }
59
}
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