Completed
Pull Request — master (#6)
by Daniel
08:59
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
    static public function classArgumentIsMandatory(string $implementation)
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
8
    {
9
        throw new self(sprintf(
10
            'The class argument is mandatory for the %s agent', $implementation
11
        ));
12
    }
13
14
    static public function setParentNotSupported(string $implementation)
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
15
    {
16
        throw new self(sprintf(
17
            'setParent is not supported by the %s agent',
18
            $implementation
19
        ));
20
    }
21
22
    static public function comparisonNotSupported(string $comparison)
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
23
    {
24
        throw new self(sprintf(
25
            'Comparison "%s" is not supported.',
26
             $comparison
27
        ));
28
    }
29
}
30