UnableToAddGrantType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A aGrantTypeExtensionIsAlreadyRegisteredForThisIdentifier() 0 10 1
1
<?php
2
/**
3
 * @author Boris Guéry <[email protected]>
4
 */
5
6
namespace Bgy\OAuth2;
7
8
class UnableToAddGrantType extends \LogicException implements Exception
9
{
10
    public static function aGrantTypeExtensionIsAlreadyRegisteredForThisIdentifier($identifier, $registeredClassName)
11
    {
12
        return new self(
13
            sprintf(
14
                'A Grant Type Extension is already registered for this identifier: "%s" (%s)',
15
                $identifier,
16
                $registeredClassName
17
            )
18
        );
19
    }
20
}
21