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

brick / orm / 23255296146

18 Mar 2026 04:24PM UTC coverage: 47.104%. Remained the same
23255296146

push

github

BenMorel
Avoid \Exception that somehow confuses ECS

1 of 5 new or added lines in 1 file covered. (20.0%)

402 existing lines in 24 files now uncovered.

553 of 1174 relevant lines covered (47.1%)

10.6 hits per line

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

0.0
/src/QueryOrderBy.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Brick\ORM;
6

7
use InvalidArgumentException;
8

9
class QueryOrderBy
10
{
11
    private string $property;
12

13
    /**
14
     * @var 'ASC'|'DESC'
15
     */
16
    private string $direction;
17

18
    /**
19
     * QueryOrderBy constructor.
20
     *
21
     * @param string $property  The property name.
22
     * @param string $direction The order direction, 'ASC' or 'DESC'.
23
     *
24
     * @throws InvalidArgumentException If the order direction is invalid.
25
     */
26
    public function __construct(string $property, string $direction)
27
    {
UNCOV
28
        if ($direction !== 'ASC' && $direction !== 'DESC') {
×
UNCOV
29
            throw new InvalidArgumentException('Invalid order by direction.');
×
30
        }
31

UNCOV
32
        $this->property = $property;
×
UNCOV
33
        $this->direction = $direction;
×
34
    }
35

36
    public function getProperty(): string
37
    {
UNCOV
38
        return $this->property;
×
39
    }
40

41
    /**
42
     * @return 'ASC'|'DESC'
43
     */
44
    public function getDirection(): string
45
    {
UNCOV
46
        return $this->direction;
×
47
    }
48
}
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