Completed
Push — master ( 170acb...bd48a4 )
by Daniel
04:18 queued 02:10
created

BadMethodCallException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 25
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A classArgumentIsMandatory() 0 6 1
A setParentNotSupported() 0 7 1
A comparisonNotSupported() 0 7 1
1
<?php
2
3
namespace Psi\Component\ObjectAgent\Exception;
4
5
class BadMethodCallException extends \BadMethodCallException
6
{
7
    public static function classArgumentIsMandatory(string $implementation)
8
    {
9
        throw new self(sprintf(
10
            'The class argument is mandatory for the %s agent', $implementation
11
        ));
12
    }
13
14
    public static function setParentNotSupported(string $implementation)
15
    {
16
        throw new self(sprintf(
17
            'setParent is not supported by the %s agent',
18
            $implementation
19
        ));
20
    }
21
22
    public static function comparisonNotSupported(string $comparison)
23
    {
24
        throw new self(sprintf(
25
            'Comparison "%s" is not supported.',
26
             $comparison
27
        ));
28
    }
29
}
30