• 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

87.5
/src/QueryPredicate.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Brick\ORM;
6

7
use InvalidArgumentException;
8

9
use function in_array;
10
use function sprintf;
11

12
class QueryPredicate
13
{
14
    private string $property;
15

16
    private string $operator;
17

18
    private mixed $value;
19

20
    /**
21
     * @param string $property The property name, optionally including dots for sub-properties.
22
     * @param string $operator The operator, such as "=", "!=" or ">".
23
     * @param mixed  $value    The value to compare against.
24
     *
25
     * @throws InvalidArgumentException If the operator is invalid.
26
     */
27
    public function __construct(string $property, string $operator, mixed $value)
28
    {
29
        if (! in_array($operator, ['=', '!=', '>', '<', '>=', '<='])) {
64✔
UNCOV
30
            throw new InvalidArgumentException(sprintf('Unknown operator "%s".', $operator));
×
31
        }
32

33
        $this->property = $property;
64✔
34
        $this->operator = $operator;
64✔
35
        $this->value = $value;
64✔
36
    }
37

38
    public function getProperty(): string
39
    {
40
        return $this->property;
63✔
41
    }
42

43
    public function getOperator(): string
44
    {
45
        return $this->operator;
63✔
46
    }
47

48
    public function getValue(): mixed
49
    {
50
        return $this->value;
63✔
51
    }
52
}
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