BadMethodCallException::queryCountNotSupported()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\ObjectAgent\Exception;
6
7
class BadMethodCallException extends \BadMethodCallException
8
{
9
    public static function classArgumentIsMandatory(string $implementation)
10
    {
11
        throw new self(sprintf(
12
            'The class argument is mandatory for the %s agent', $implementation
13
        ));
14
    }
15
16
    public static function setParentNotSupported(string $implementation)
17
    {
18
        throw new self(sprintf(
19
            'setParent is not supported by the %s agent',
20
            $implementation
21
        ));
22
    }
23
24
    public static function queryCountNotSupported(string $implementation)
25
    {
26
        throw new self(sprintf(
27
            'queryCount is not supported by the %s agent',
28
            $implementation
29
        ));
30
    }
31
32
    public static function comparisonNotSupported(string $comparison)
33
    {
34
        throw new self(sprintf(
35
            'Comparison "%s" is not supported.',
36
             $comparison
37
        ));
38
    }
39
}
40